From 001a2d9b67f3bf685c5a2df6495b999cc3966acc Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Mon, 15 Oct 2007 16:24:46 +0000 Subject: [PATCH] Fix LDAP compile error when LDAP is not available. Fixed a typo in the LDAP configure code and made sure NULL is defined in a test programs that need it. --- acinclude.m4 | 7 ++++++- lib/url.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index d477f0785..fe62273f2 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -266,6 +266,7 @@ AC_DEFUN([CURL_CHECK_HEADER_LBER], [ #endif #include #else +#include #ifdef HAVE_SYS_TYPES_H #include #endif @@ -295,6 +296,7 @@ AC_DEFUN([CURL_CHECK_HEADER_LBER], [ #endif #include #else +#include #ifdef HAVE_SYS_TYPES_H #include #endif @@ -434,6 +436,7 @@ AC_DEFUN([CURL_CHECK_HEADER_LDAPSSL], [ #endif #include #else +#include #ifdef HAVE_SYS_TYPES_H #include #endif @@ -495,6 +498,7 @@ AC_DEFUN([CURL_CHECK_LIBS_LDAP], [ #endif #include #else +#include #ifdef HAVE_SYS_TYPES_H #include #endif @@ -507,7 +511,7 @@ AC_DEFUN([CURL_CHECK_LIBS_LDAP], [ #endif #ifdef HAVE_LDAP_H #include -#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 #include #include #include diff --git a/lib/url.c b/lib/url.c index 549e640b3..e6b0d7f27 100644 --- 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