aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBobby Powers <bobbypowers@gmail.com>2014-07-25 08:54:09 -0700
committerIan Lance Taylor <iant@golang.org>2014-07-25 08:54:09 -0700
commitda8f677815d09e2c3fc2175d128087ae5cc65dae (patch)
treefc013ba3ee3b59cf4264f8bf55b090af818c4869 /include
parent0f2cde8bdc9a6f31bc6a8ebbd0b078d9c49acb23 (diff)
downloadgo-da8f677815d09e2c3fc2175d128087ae5cc65dae.tar.xz
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
Diffstat (limited to 'include')
-rw-r--r--include/u.h1
1 files changed, 1 insertions, 0 deletions
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