Skip to content

Commit b48cd4b

Browse files
adgianlancetaylor
authored andcommitted
[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
1 parent 1798bb2 commit b48cd4b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/u.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ extern "C" {
4040
#endif
4141
#define _BSD_SOURCE 1
4242
#define _NETBSD_SOURCE 1 /* NetBSD */
43+
#define _DEFAULT_SOURCE 1 /* glibc > 2.19 */
4344
#define _SVID_SOURCE 1
4445
#if !defined(__APPLE__) && !defined(__OpenBSD__)
4546
# define _XOPEN_SOURCE 1000

0 commit comments

Comments
 (0)