Commit da8f6778 authored by Bobby Powers's avatar Bobby Powers Committed by Ian Lance Taylor

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
parent 0f2cde8b
...@@ -40,6 +40,7 @@ extern "C" { ...@@ -40,6 +40,7 @@ extern "C" {
#endif #endif
#define _BSD_SOURCE 1 #define _BSD_SOURCE 1
#define _NETBSD_SOURCE 1 /* NetBSD */ #define _NETBSD_SOURCE 1 /* NetBSD */
#define _DEFAULT_SOURCE 1 /* glibc > 2.19 */
#define _SVID_SOURCE 1 #define _SVID_SOURCE 1
#if !defined(__APPLE__) && !defined(__OpenBSD__) #if !defined(__APPLE__) && !defined(__OpenBSD__)
# define _XOPEN_SOURCE 1000 # define _XOPEN_SOURCE 1000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment