diff options
Diffstat (limited to 'lib/cdefs.h')
-rw-r--r-- | lib/cdefs.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/cdefs.h b/lib/cdefs.h index de74f4211cf..17a0919cd83 100644 --- a/lib/cdefs.h +++ b/lib/cdefs.h @@ -320,14 +320,16 @@ #endif /* The nonnull function attribute marks pointer parameters that - must not be NULL. Do not define __nonnull if it is already defined, - for portability when this file is used in Gnulib. */ + must not be NULL. */ #ifndef __nonnull # if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__) # define __nonnull(params) __attribute__ ((__nonnull__ params)) # else # define __nonnull(params) # endif +#elif !defined __GLIBC__ +# undef __nonnull +# define __nonnull(params) _GL_ATTRIBUTE_NONNULL (params) #endif /* If fortification mode, we warn about unused results of certain |