Why do I get warnings "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"?
You are compiling the code on a system that has glibc 2.20 or later installed. In glibc 2.20, the _BSD_SOURCE and _SVID_SOURCE feature test macros were deprecated. They continue to expose the definitions that they exposed in earlier glibc versions, but their use produces the warning noted above. Instead, the _DEFAULT_SOURCE macro should be used. There are a few possible workarounds to avoid these warnings:
- Replace all instances of#define _BSD_SOURCEand#define _SVID_SOURCEin the source code with#define _DEFAULT_SOURCE
- Modify the Makefile.incfile to add-D_DEFAULT_SOURCEto the definition of theIMPL_CFLAGSmacro.
- Downloadthe latest code tarball,which contains the fix described in the previous point.
http://man7.org/tlpi/code/faq.html#use_default_source