https://bugs.openldap.org/show_bug.cgi?id=10581
Issue ID: 10581 Summary: Mismatch of crypt() prototype on PPC Mac OS X 10.5.8, Leopard Product: OpenLDAP Version: 2.6.14 Hardware: Other OS: Mac OS Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: build Assignee: bugs@openldap.org Reporter: Peter_Dyballa@Web.DE Target Milestone: ---
This happens with OpenLDAP versions 2.6.13 and 2.61.4:
/opt/local/bin/gcc-mp-15 -pipe -Os -arch ppc -I../../include -I../../include -isystem/opt/local/include/LegacySupport -I/opt/local/include -I/opt/local/include/db48 -I/opt/local/include/openssl -DBIND_8_COMPAT -DMDB_FDATASYNC=fsync -DMDB_DSYNC=O_SYNC -c -o passwd.o passwd.c In file included from passwd.c:38: ../../include/ac/crypt.h:26:23: error: conflicting types for 'crypt'; have 'char *(void)' 26 | extern char *(crypt)(); | ^~~~~ In file included from /opt/local/include/LegacySupport/unistd.h:87, from ../../include/ac/unistd.h:25, from passwd.c:34: /usr/include/unistd.h:424:10: note: previous declaration of 'crypt' with type 'char *(const char *, const char *)' 424 | char *crypt(const char *, const char *); | ^~~~~ passwd.c: In function 'lutil_crypt': passwd.c:627:20: error: too many arguments to function 'crypt'; expected 0, have 2 627 | char *cr = crypt( key, salt ); | ^~~~~ ~~~ ../../include/ac/crypt.h:26:23: note: declared here 26 | extern char *(crypt)(); | ^~~~~ make[2]: *** [passwd.o] Error 1 make[2]: Leaving directory `/opt/local/var/macports/build/openldap-afe672a1/work/openldap-2.6.14/libraries/liblutil' make[1]: *** [all-common] Error 1 make[1]: Leaving directory `/opt/local/var/macports/build/openldap-afe672a1/work/openldap-2.6.14/libraries' make: *** [all-common] Error 1 make: Leaving directory `/opt/local/var/macports/build/openldap-afe672a1/work/openldap-2.6.14' Command failed: cd "/opt/local/var/macports/build/openldap-afe672a1/work/openldap-2.6.14" && /usr/bin/make -w all Exit code: 2
On Leopard /usr/include/unistd.h has:
char *crypt(const char *, const char *);
So I ended applying this simple patch:
--- include/ac/crypt.h~ 2026-08-06 18:45:16.000000000 +0200 +++ include/ac/crypt.h 2026-08-30 11:21:21.000000000 +0200 @@ -22,8 +22,6 @@ /* crypt() may be defined in a separate include file */ #ifdef HAVE_CRYPT_H # include <crypt.h> -#else - extern char *(crypt)(); #endif
#endif /* _AC_CRYPT_H */
This happens when using the MacPorts package manager. The issue can be viewed (and also commented) here: https://trac.macports.org/ticket/73673.
https://bugs.openldap.org/show_bug.cgi?id=10581
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.6.15 Keywords|needs_review |
https://bugs.openldap.org/show_bug.cgi?id=10581
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.6.15 |2.6.16
https://bugs.openldap.org/show_bug.cgi?id=10581
--- Comment #1 from Howard Chu hyc@openldap.org --- See if this silences that error
iff --git a/include/ac/crypt.h b/include/ac/crypt.h index 021d4bac28..88646922c7 100644 --- a/include/ac/crypt.h +++ b/include/ac/crypt.h @@ -23,7 +23,9 @@ #ifdef HAVE_CRYPT_H # include <crypt.h> #else +# ifndef HAVE_UNISTD_H extern char *(crypt)(); +# endif #endif
#endif /* _AC_CRYPT_H */
https://bugs.openldap.org/show_bug.cgi?id=10581
--- Comment #2 from Peter Dyballa Peter_Dyballa@Web.DE --- (In reply to Howard Chu from comment #1)
See if this silences that error
It will take one day or two until I could try – my PowerBook is trying to upgrade OpenSSL. This lasts…
https://bugs.openldap.org/show_bug.cgi?id=10581
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FEEDBACK Status|UNCONFIRMED |RESOLVED
https://bugs.openldap.org/show_bug.cgi?id=10581
--- Comment #3 from Peter Dyballa Peter_Dyballa@Web.DE --- (In reply to Howard Chu from comment #1)
See if this silences that error
Yes, no types conflict! (On PPC Leopard, Mac OS X 10.5.8. Going to check on my other Macs later.) Build progresses, test will follow.
https://bugs.openldap.org/show_bug.cgi?id=10581
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|bugs@openldap.org |hyc@openldap.org Status|RESOLVED |UNCONFIRMED Resolution|FEEDBACK |---
--- Comment #4 from Howard Chu hyc@openldap.org --- https://git.openldap.org/openldap/openldap/-/merge_requests/932
Slightly different, but same effect.
https://bugs.openldap.org/show_bug.cgi?id=10581
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |IN_PROGRESS
https://bugs.openldap.org/show_bug.cgi?id=10581
--- Comment #5 from Peter Dyballa Peter_Dyballa@Web.DE --- (In reply to Howard Chu from comment #1)
See if this silences that error
Testing it on my most up-to-date Mac with oldish macOS Sonoma 14.8.9 reveals no problems, all tests succeed, even when configuring --enable-balancer.
Tomorrow the new patch will be tested.
https://bugs.openldap.org/show_bug.cgi?id=10581
--- Comment #6 from Peter Dyballa Peter_Dyballa@Web.DE --- On my older Mac with macOS High Sierra, Version 10.13.6, all builds and tests well, including with --enable-balancer.
These two "modern" Macs with intel x86_64 use OpenLDAP 2.6.13 while my very old PowerBook was already working with version 2.6.14. I can repeat builds and tests on intel with this up-to-date version if you want.
https://bugs.openldap.org/show_bug.cgi?id=10581
--- Comment #7 from Howard Chu hyc@openldap.org --- Thanks for confirming. It sounds like we're in good shape now.
https://bugs.openldap.org/show_bug.cgi?id=10581
--- Comment #8 from Peter Dyballa Peter_Dyballa@Web.DE --- (In reply to Howard Chu from comment #4)
https://git.openldap.org/openldap/openldap/-/merge_requests/932
I was not able to download that patch, so I fetched the patched version of crypt.h and created the patch locally…
On macOS High Sierra, Version 10.13.6, Darwin 17.7.0, testing OpenLDAP 2.6.14 (./configure --prefix=/opt/local --enable-crypt --enable-ipv6 --enable-syncprov --enable-wrappers --localstatedir=/opt/local/var --mandir=/opt/local/share/man --with-cyrus-sasl --with-fetch --enable-balancer --with-tls) leads to an error (in less than 15 minutes):
Using ldapmodify to add/modify/delete entries from server 1... iteration 1 iteration 2 iteration 3 iteration 4 iteration 5 iteration 6 iteration 7 iteration 8 iteration 9 iteration 10 Waiting 7 seconds for servers to resync... Using ldapsearch to read all the entries from server 1... Using ldapsearch to read all the entries from server 2... Using ldapsearch to read all the entries from server 3... Using ldapsearch to read all the entries from server 4... Comparing retrieved entries from server 1 and server 2... Comparing retrieved entries from server 1 and server 3... test failed - server 1 and server 3 databases differ
00:10:19 Failed test050-syncrepl-multiprovider for mdb after 116 seconds
(exit 1) make[2]: *** [mdb-yes] Error 1
https://bugs.openldap.org/show_bug.cgi?id=10581
--- Comment #9 from Peter Dyballa Peter_Dyballa@Web.DE --- Same behaviour when using your original patch.
Next try will be without --enable-balancer.
https://bugs.openldap.org/show_bug.cgi?id=10581
--- Comment #10 from Peter Dyballa Peter_Dyballa@Web.DE --- Version 2.6.14 seems to have a test problem… Failure also without --enable-balancer.
Next test with new patch, then without because "modern" versions do not need the patch.
https://bugs.openldap.org/show_bug.cgi?id=10581
--- Comment #11 from Peter Dyballa Peter_Dyballa@Web.DE --- With OpenLDAP 2.6.14 testing fails always with
Using ldapmodify to add/modify/delete entries from server 1... iteration 1 iteration 2 iteration 3 iteration 4 iteration 5 iteration 6 iteration 7 iteration 8 iteration 9 iteration 10 Waiting 7 seconds for servers to resync... Using ldapsearch to read all the entries from server 1... Using ldapsearch to read all the entries from server 2... Using ldapsearch to read all the entries from server 3... Using ldapsearch to read all the entries from server 4... Comparing retrieved entries from server 1 and server 2... test failed - server 1 and server 2 databases differ
00:10:37 Failed test050-syncrepl-multiprovider for mdb after 117 seconds
(exit 1) make[2]: *** [mdb-yes] Error 1 make[1]: *** [test] Error 2
on macOS High Sierra, Version 10.13.6 or Darwin 17.7.0.
https://bugs.openldap.org/show_bug.cgi?id=10581
--- Comment #12 from Howard Chu hyc@openldap.org --- This patch would have nothing to do with that. That should be a new ticket.
https://bugs.openldap.org/show_bug.cgi?id=10581
--- Comment #13 from Peter Dyballa Peter_Dyballa@Web.DE --- A final remark: Both patches work fine on all my Macs.
https://bugs.openldap.org/show_bug.cgi?id=10581
--- Comment #14 from Peter Dyballa Peter_Dyballa@Web.DE --- The latest patch allows to build OpenLDAP version 2.6.15 on all my Macs. The change to test/scripts/all to determine which date dialect is being used works too.
https://bugs.openldap.org/show_bug.cgi?id=10581
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |TEST
--- Comment #15 from Quanah Gibson-Mount quanah@openldap.org --- head:
1ce58779 by Howard Chu at 2026-10-05T16:06:12+00:00
ITS#10581 include/ac/crypt.h: don't define if <unistd.h> is present
RE26:
bed11d68 by Howard Chu at 2026-10-09T23:41:19+00:00
ITS#10581 include/ac/crypt.h: don't define if <unistd.h> is present
RE27:
d0459fe7 by Howard Chu at 2026-10-09T23:41:15+00:00
ITS#10581 include/ac/crypt.h: don't define if <unistd.h> is present
https://bugs.openldap.org/show_bug.cgi?id=10581
--- Comment #16 from Quanah Gibson-Mount quanah@openldap.org --- 85841e59 by Howard Chu at 2026-10-13T16:55:22+01:00
ITS#10581 include/ac/crypt.h: fix prev commit
https://bugs.openldap.org/show_bug.cgi?id=10581
--- Comment #17 from Quanah Gibson-Mount quanah@openldap.org --- RE27:
208b8a24 by Howard Chu at 2026-10-14T22:42:02+00:00
ITS#10581 include/ac/crypt.h: fix prev commit
RE26:
ef324abe by Howard Chu at 2026-10-14T22:42:05+00:00
ITS#10581 include/ac/crypt.h: fix prev commit