glibc 2.20 deprecated _BSD_SOURCE and _SVID_SOURCE and now requires
_DEFAULT_SOURCE to be defined instead. Add _DEFAULT_SOURCE define to
prevent warnings like:
In file included from /usr/include/stdio.h:27:0,
from stack_switch.c:5:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
^
See https://sourceware.org/glibc/wiki/Release/2.20#Packaging_Changes
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15768
#define _XOPEN_SOURCE 600
+
+/* Legacy feature macro. */
#define _BSD_SOURCE
+/* New feature macro, always define to squash warning about _BSD_SOURCE
+ with glibc 2.20+. */
+#define _DEFAULT_SOURCE 1
+
#define _GNU_SOURCE
#include <stdio.h>