[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#5421) slapd vs LDAP_R_COMPILE

Full_Name: Hallvard B Furuseth
Version: HEAD, RE23, RE24
Submission from: (NULL) (
Submitted by: hallvard

Some slapd source files include libldap/ldap-int.h, which contains
in structs.  slapd links libldap_r but does not define LDAP_R_COMPILE,
so these files have access to bad struct definitions.  A quick grep
doesn't show any use cases though.  Anyway:

Either #ifdef LDAP_R_COMPILE in libldap(_r)should be something else,
or we should define LDAP_R_COMPILE in slapd - maybe like this:
--- slap.h	13 Mar 2008 13:37:07
+++ slap.h	13 Mar 2008 16:40:25
@@ -28,4 +28,10 @@
 #define _SLAP_H_
+#if defined _LDAP_INT_H
+# error include slap.h before ldap-int.h
+#elif !defined NO_THREADS
+# define LDAP_R_COMPILE 1
 #include "ldap_defaults.h"