_BSD_SOURCE is deprecated, use _DEFAULT_SOURCE instead
authorRichard Levitte <levitte@openssl.org>
Wed, 2 Dec 2015 17:18:03 +0000 (18:18 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 2 Dec 2015 17:23:16 +0000 (18:23 +0100)
The feature_test_macros(7) manual tells us that _BSD_SOURCE is
deprecated since glibc 2.20 and that the compiler will warn about it
being used, unless _DEFAULT_SOURCE is defined as well.

Reviewed-by: Rich Salz <rsalz@openssl.org>
test/ssltest.c

index 1128ec83b850e9dc2d126c109e4a843bff2d0267..68d48d1d739b6c4f649689eb0ff03c271b653df7 100644 (file)
 
 /* Or gethostname won't be declared properly on Linux and GNU platforms. */
 #define _BSD_SOURCE 1
+#define _DEFAULT_SOURCE 1
 
 #include <assert.h>
 #include <errno.h>