fix compiler warnings due to deprecated _BSD_SOURCE
With glibc 2.20 (and newer), defining _BSD_SOURCE (only) will now generate compiler warnings similar to: /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] See the glibc 2.20 release notes, https://lwn.net/Articles/611162/. This patch adds the required _DEFAULT_SOURCE. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de> Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
This commit is contained in:
parent
ba28ef2b30
commit
568c7a0e81
2
fel.c
2
fel.c
@ -16,6 +16,8 @@
|
||||
*/
|
||||
|
||||
/* Needs _BSD_SOURCE for htole and letoh */
|
||||
/* glibc 2.20+ also requires _DEFAULT_SOURCE */
|
||||
#define _DEFAULT_SOURCE
|
||||
#define _BSD_SOURCE
|
||||
#define _NETBSD_SOURCE
|
||||
|
||||
|
||||
@ -16,6 +16,8 @@
|
||||
*/
|
||||
|
||||
/* Needs _BSD_SOURCE for htole and letoh */
|
||||
/* glibc 2.20+ also requires _DEFAULT_SOURCE */
|
||||
#define _DEFAULT_SOURCE
|
||||
#define _BSD_SOURCE
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user