From: Theodore Ts'o Date: Mon, 21 Mar 2016 17:01:27 +0000 (-0400) Subject: Fix warnings caused by glibc 2.20 X-Git-Tag: android-x86-8.1-r1~49^2^2^2^2~28^2~5 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=31ddef52baa2ae6622dbe9f2e9be74b430fe9de0;p=android-x86%2Fexternal-e2fsprogs.git Fix warnings caused by glibc 2.20 Glibc has depcreated _SVID_SOURCE and _BSD_SOURCE in favor of _DEFAULT_SOURCE. So define _DEFAULT_SOURCE to shut up glibc 2.20 Signed-off-by: Theodore Ts'o --- diff --git a/lib/ext2fs/mmp.c b/lib/ext2fs/mmp.c index e4c7dccd..7d86c9e4 100644 --- a/lib/ext2fs/mmp.c +++ b/lib/ext2fs/mmp.c @@ -12,6 +12,9 @@ #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif +#ifndef _DEFAULT_SOURCE +#define _DEFAULT_SOURCE /* since glibc 2.20 _SVID_SOURCE is deprecated */ +#endif #include "config.h" diff --git a/lib/uuid/gen_uuid.c b/lib/uuid/gen_uuid.c index 22b45134..fb6a9b8f 100644 --- a/lib/uuid/gen_uuid.c +++ b/lib/uuid/gen_uuid.c @@ -37,6 +37,7 @@ * gcc-wall wall mode */ #define _SVID_SOURCE +#define _DEFAULT_SOURCE /* since glibc 2.20 _SVID_SOURCE is deprecated */ #include "config.h" diff --git a/misc/mk_hugefiles.c b/misc/mk_hugefiles.c index 5f56a79c..8ac94dcb 100644 --- a/misc/mk_hugefiles.c +++ b/misc/mk_hugefiles.c @@ -4,6 +4,7 @@ #define _XOPEN_SOURCE 600 /* for inclusion of PATH_MAX in Solaris */ #define _BSD_SOURCE /* for makedev() and major() */ +#define _DEFAULT_SOURCE /* since glibc 2.20 _BSD_SOURCE is deprecated */ #include "config.h" #include diff --git a/misc/tune2fs.c b/misc/tune2fs.c index aed0a35a..6e423a51 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -44,6 +44,7 @@ extern int optind; #include /* for strcasecmp() */ #else #define _BSD_SOURCE /* for inclusion of strcasecmp() via */ +#define _DEFAULT_SOURCE /* since glibc 2.20 _BSD_SOURCE is deprecated */ #endif #include #include