Solaris build fix for Oracle's LDAP libraries.
[exim.git] / src / src / lookups / ldap.c
index 06b74946912ff5d9ecc25930103f519d0f56db64..2a4199c3ac25f2e81efa0a22b0019bc436aea507 100644 (file)
@@ -521,10 +521,13 @@ if (!lcp->bound ||
   {
   DEBUG(D_lookup) debug_printf("%sbinding with user=%s password=%s\n",
     (lcp->bound)? "re-" : "", user, password);
+#ifdef LDAP_OPT_X_TLS
+  /* The Oracle LDAP libraries (LDAP_LIB_TYPE=SOLARIS) don't support this: */
   if (eldap_start_tls)
     {
     ldap_start_tls_s(lcp->ld, NULL, NULL);
     }
+#endif
   if ((msgid = ldap_bind(lcp->ld, CS user, CS password, LDAP_AUTH_SIMPLE))
        == -1)
     {