From: Joel Brobecker Date: Mon, 19 Jan 2015 15:29:07 +0000 (+0100) Subject: strerror.c: Do not declare sys_nerr or sys_errlist if already macros X-Git-Tag: gdb-7.9.0-release~66 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc7a185117f1d2844971fffeef8f778eb8690c85;p=thirdparty%2Fbinutils-gdb.git strerror.c: Do not declare sys_nerr or sys_errlist if already macros This fixes a MinGW warning in libiberty/strerror.c. 2015-01-19 Eli Zaretskii * strerror.c : Declare only if they aren't macros. (cherry picked from commit 1f99f6d0689d20db44c0c7d88e8af1ebe900d187) --- diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index ac2387552ed..22e3f8504b3 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +2015-01-19 Eli Zaretskii + + * strerror.c : Declare only if they aren't + macros. + 2014-12-24 Uros Bizjak Ben Elliston Manuel Lopez-Ibanez diff --git a/libiberty/strerror.c b/libiberty/strerror.c index 0efadc3d65e..a8a0bd1f7e2 100644 --- a/libiberty/strerror.c +++ b/libiberty/strerror.c @@ -469,8 +469,13 @@ static const char **sys_errlist; #else + +#ifndef sys_nerr extern int sys_nerr; +#endif +#ifndef sys_errlist extern char *sys_errlist[]; +#endif #endif