From: Andrew Gerrand Date: Mon, 11 Aug 2014 23:38:23 +0000 (+1000) Subject: [release-branch.go1.3] include/u.h: define _DEFAULT_SOURCE for new glibc X-Git-Tag: go1.3.1~11 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b48cd4b9dcb6cefb8dcff6ee571234620a879b68;p=gostls13.git [release-branch.go1.3] include/u.h: define _DEFAULT_SOURCE for new glibc ««« CL 112530043 / c8059ac4e0ec include/u.h: define _DEFAULT_SOURCE for new glibc glibc devs have apparently decided _BSD_SOURCE will be deprecated on Linux, and issue a preprocessor warning if declaring _BSD_SOURCE without _DEFAULT_SOURCE. https://sourceware.org/glibc/wiki/Release/2.20 Fixes #8397. LGTM=iant R=dave, gobot, iant CC=golang-codereviews https://golang.org/cl/112530043 »»» TBR=rsc CC=golang-codereviews https://golang.org/cl/124150043 --- diff --git a/include/u.h b/include/u.h index 6b2d50cc1f..489b2a3886 100644 --- a/include/u.h +++ b/include/u.h @@ -40,6 +40,7 @@ extern "C" { #endif #define _BSD_SOURCE 1 #define _NETBSD_SOURCE 1 /* NetBSD */ +#define _DEFAULT_SOURCE 1 /* glibc > 2.19 */ #define _SVID_SOURCE 1 #if !defined(__APPLE__) && !defined(__OpenBSD__) # define _XOPEN_SOURCE 1000