mirror of https://github.com/getdnsapi/getdns.git
define _DEFAULT_SOURCE as well as _BSD_SOURCE for glibc version 2.20 and up
in recent versions of feature_test_macros(7), it says of _BSD_SOURCE: Since glibc 2.20, this macro is deprecated. It now has the same effect as defining _DEFAULT_SOURCE, but generates a compile-time warning (unless _DEFAULT_SOURCE is also defined). Use _DEFAULT_SOURCE instead. To allow code that requires _BSD_SOURCE in glibc 2.19 and earlier and _DEFAULT_SOURCE in glibc 2.20 and later to compile without warnings, define both _BSD_SOURCE and _DEFAULT_SOURCE.
This commit is contained in:
parent
ce1185166c
commit
4047bd09da
|
@ -98,7 +98,7 @@ AX_CHECK_COMPILE_FLAG([-xc99],[CFLAGS="$CFLAGS -xc99"],[],[])
|
||||||
AX_CHECK_COMPILE_FLAG([-Wall],[CFLAGS="$CFLAGS -Wall"],[],[])
|
AX_CHECK_COMPILE_FLAG([-Wall],[CFLAGS="$CFLAGS -Wall"],[],[])
|
||||||
|
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
linux* ) CFLAGS="$CFLAGS -D_BSD_SOURCE"
|
linux* ) CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
|
||||||
;;
|
;;
|
||||||
solaris* ) CFLAGS="$CFLAGS -D__EXTENSIONS__" # for strdup() from <string.h>
|
solaris* ) CFLAGS="$CFLAGS -D__EXTENSIONS__" # for strdup() from <string.h>
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue