https://bugs.openldap.org/show_bug.cgi?id=9348
--- Comment #9 from Howard Chu hyc@openldap.org --- Created attachment 765 --> https://bugs.openldap.org/attachment.cgi?id=765&action=edit Fix build without sys_errlist
(In reply to ditu.alexandru from comment #8)
(In reply to Howard Chu from comment #7)
You actually need to set both ol_cv_dcl_sys_errlist=no and ol_cv_have_sys_errlist=no.
When using this config: ./configure ol_cv_have_sys_errlist=no ol_cv_dcl_sys_errlist=no --enable-shared=no --with-pic --enable-slapd=no --with-cyrus-sasl --prefix=/build-x86_64/tmp
I receive the following errors (about these errors I was talking about in the comment 5):
gcc -g -O2 -I../../include -I../../include -I/build-x86_64/tmp/include -DLDAP_LIBRARY -c util-int.c -fPIC -DPIC -o util-int.o In file included from util-int.c:31: ../../include/ac/errno.h:28:20: error: expected identifier or '(' before numeric constant # define sys_nerr 0 ^ ../../include/ac/errno.h:29:25: error: expected identifier or '(' before 'char' # define sys_errlist ((char **)0) ^~~~ ../../include/ac/errno.h:29:33: error: expected ')' before numeric constant # define sys_errlist ((char **)0) ^ Makefile:412: recipe for target 'util-int.lo' failed
OK, I see these errors too. The attached patch will shut that up. Moving forward, all of these definitions should be removed, as only one place even uses this STRERROR stuff now. Everything else uses AC_STRERROR_R.