]> granicus.if.org Git - curl/commitdiff
Fix LDAP compile error when LDAP is not available.
authorDan Fandrich <dan@coneharvesters.com>
Mon, 15 Oct 2007 16:24:46 +0000 (16:24 +0000)
committerDan Fandrich <dan@coneharvesters.com>
Mon, 15 Oct 2007 16:24:46 +0000 (16:24 +0000)
Fixed a typo in the LDAP configure code and made sure NULL is defined
in a test programs that need it.

acinclude.m4
lib/url.c

index d477f0785d9c39036a0d0146d00987634c124114..fe62273f206e33645e7e68c94809e76028899016 100644 (file)
@@ -266,6 +266,7 @@ AC_DEFUN([CURL_CHECK_HEADER_LBER], [
 #endif
 #include <windows.h>
 #else
+#include <stddef.h>
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -295,6 +296,7 @@ AC_DEFUN([CURL_CHECK_HEADER_LBER], [
 #endif
 #include <windows.h>
 #else
+#include <stddef.h>
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -434,6 +436,7 @@ AC_DEFUN([CURL_CHECK_HEADER_LDAPSSL], [
 #endif
 #include <windows.h>
 #else
+#include <stddef.h>
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -495,6 +498,7 @@ AC_DEFUN([CURL_CHECK_LIBS_LDAP], [
 #endif
 #include <windows.h>
 #else
+#include <stddef.h>
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -507,7 +511,7 @@ AC_DEFUN([CURL_CHECK_LIBS_LDAP], [
 #endif
 #ifdef HAVE_LDAP_H
 #include <ldap.h>
-#endif"
+#endif
       ],[
         BerValue *bvp = NULL;
         BerElement *bep = ber_init(bvp);
@@ -1685,6 +1689,7 @@ dnl
 AC_DEFUN([CURL_CHECK_WORKING_RESOLVER],[
 AC_MSG_CHECKING([if "localhost" resolves])
 AC_TRY_RUN([
+#include <stddef.h>
 #include <string.h>
 #include <sys/types.h>
 #include <netdb.h>
index 549e640b3aec936ac667c44f3993137efeec8ded..e6b0d7f273659da6c8262833e5ecac369efff5ff 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -242,7 +242,7 @@ static const struct Curl_handler * const protocols[] = {
   &Curl_handler_ldap,
 #endif
 
-#if defined(HAVE_LDAP_SSL) && !defined(CURL_DISABLE_SSL)
+#if !defined(CURL_DISABLE_LDAP) && defined(HAVE_LDAP_SSL)
   &Curl_handler_ldaps,
 #endif