From: Petr Tesarik Subject: gnulib: Provide a definition of __warndecl Upstream: never, compatibility with SLE12 only The local copy of string.h includes the system string.h. Older glibc makes use of the __warndecl macro, but gnulib's cdefs.h does not provide one. Signed-off-by: Petr Tesarik --- gdb-10.2/gnulib/import/cdefs.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) --- a/gnulib/import/cdefs.h +++ b/gnulib/import/cdefs.h @@ -704,4 +704,16 @@ _Static_assert (0, "IEEE 128-bits long d # define __attribute_returns_twice__ /* Ignore. */ #endif +#if __GNUC_PREREQ (4,3) +# define __warndecl(name, msg) \ + extern void name (void) __attribute__((__warning__ (msg))) +# define __warnattr(msg) __attribute__((__warning__ (msg))) +# define __errordecl(name, msg) \ + extern void name (void) __attribute__((__error__ (msg))) +#else +# define __warndecl(name, msg) extern void name (void) +# define __warnattr(msg) +# define __errordecl(name, msg) extern void name (void) +#endif + #endif /* sys/cdefs.h */