]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9348 don't declare sys_errlist if not present
authorHoward Chu <hyc@openldap.org>
Wed, 16 Sep 2020 14:08:52 +0000 (15:08 +0100)
committerHoward Chu <hyc@openldap.org>
Wed, 16 Sep 2020 14:11:01 +0000 (15:11 +0100)
If HAVE_SYS_ERRLIST is false, nothing uses them anyway, so the
declarations serve no purpose. Just breaks the compile if the
library actually defines them (and we are avoiding using them).

include/ac/errno.h

index 9e71f29dd832acfa1d1851b2511c9c3929f4e4ba..b34ec7684178173da31ebdcbf953979903b08686 100644 (file)
 # include <sys/errno.h>
 #endif
 
-#ifndef HAVE_SYS_ERRLIST
-       /* no sys_errlist */
-#      define          sys_nerr        0
-#      define          sys_errlist     ((char **)0)
-#elif defined( DECL_SYS_ERRLIST )
+#if defined( HAVE_SYS_ERRLIST ) && defined( DECL_SYS_ERRLIST )
        /* have sys_errlist but need declaration */
        LDAP_LIBC_V(int)      sys_nerr;
        LDAP_LIBC_V(char)    *sys_errlist[];