From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ns.lynxeye.de ([87.118.118.114] helo=lynxeye.de) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YS84W-0006fV-T4 for barebox@lists.infradead.org; Sun, 01 Mar 2015 17:54:33 +0000 Received: from antimon.intern.lynxeye.de.Speedport_W_504V_Typ_A (p4FD7E534.dip0.t-ipconnect.de [79.215.229.52]) by lynxeye.de (Postfix) with ESMTPA id E4D7026C2001 for ; Sun, 1 Mar 2015 18:53:38 +0100 (CET) From: Lucas Stach Date: Sun, 1 Mar 2015 18:53:29 +0100 Message-Id: <1425232409-16920-1-git-send-email-dev@lynxeye.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH] scripts: fix warning generated by glibc 2.20 To: barebox@lists.infradead.org Defining only _BSD_SOURCE is deprecated with version 2.20 of glibc. It has been replaced by _DEFAULT_SOURCE. The manpage says that code which wants to work in the same way on both old and new versions of glibc should simply define both symbols. Also move the definition up in fix_size as those feature flags should be defined before including any standard headers. Signed-off-by: Lucas Stach --- scripts/fix_size.c | 6 +++--- scripts/mk-omap-image.c | 1 + scripts/mkublheader.c | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/fix_size.c b/scripts/fix_size.c index c7dcd5ff6b60..7014a3faf611 100644 --- a/scripts/fix_size.c +++ b/scripts/fix_size.c @@ -1,3 +1,6 @@ +#define _BSD_SOURCE /* See feature_test_macros(7) */ +#define _DEFAULT_SOURCE + #include #include #include @@ -6,9 +9,6 @@ #include #include #include -#ifndef _BSD_SOURCE -#define _BSD_SOURCE /* See feature_test_macros(7) */ -#endif #include int main(int argc, char**argv) diff --git a/scripts/mk-omap-image.c b/scripts/mk-omap-image.c index d0335ad1747d..1d61a34e6507 100644 --- a/scripts/mk-omap-image.c +++ b/scripts/mk-omap-image.c @@ -34,6 +34,7 @@ */ #define _BSD_SOURCE +#define _DEFAULT_SOURCE #include #include diff --git a/scripts/mkublheader.c b/scripts/mkublheader.c index b61630a25fb8..5464a8061176 100644 --- a/scripts/mkublheader.c +++ b/scripts/mkublheader.c @@ -19,6 +19,7 @@ */ #define _BSD_SOURCE +#define _DEFAULT_SOURCE #include #include -- 2.1.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox