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:
Bernhard Nortmann 2015-09-09 11:57:47 +02:00 committed by Siarhei Siamashka
parent ba28ef2b30
commit 568c7a0e81
3 changed files with 6 additions and 0 deletions

2
fel.c
View File

@ -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

View File

@ -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>

2
pio.c
View File

@ -18,6 +18,8 @@
*/
/* needs _BSD_SOURCE for htole and letoh */
/* glibc 2.20+ also requires _DEFAULT_SOURCE */
#define _DEFAULT_SOURCE
#define _BSD_SOURCE
#include <errno.h>