https://bugs.openldap.org/show_bug.cgi?id=9201
--- Comment #3 from Quanah Gibson-Mount quanah@openldap.org --- Digging further, at line 76:
LDAP_THREAD_IMPLEMENTATION is defined, which changes some behaviors in ldap_thr_debug.h. It is not defined in the prior inclusion.
So ldap_thr_debug.h needs some tweaking to handle this.