1From c500d9906f163bf716c872d37403b9de02ef0a86 Mon Sep 17 00:00:00 2001
2From: Amy Fong <amy.fong@windriver.com>
3Date: Fri, 18 Jan 2013 12:13:32 -0500
4Subject: [PATCH] autofs: fails to compile with openldap disabled
5
6As of 5.0.6, it appears that changes were introduced so that
7if you compile with openldap disabled and openldap headers are not
8available, then autofs fails to build.
9
10Upstream-Status: Pending
11
12Signed-off-by: Amy Fong <amy.fong@windriver.com>
13--
14 lookup_ldap.h |    4 ++++
15 1 file changed, 4 insertions(+)
16
17---
18 include/lookup_ldap.h | 4 ++++
19 1 file changed, 4 insertions(+)
20
21diff --git a/include/lookup_ldap.h b/include/lookup_ldap.h
22index 3a7aba7..bfdb0b3 100644
23--- a/include/lookup_ldap.h
24+++ b/include/lookup_ldap.h
25@@ -1,7 +1,9 @@
26 #ifndef LOOKUP_LDAP_H
27 #define LOOKUP_LDAP_H
28
29+#ifdef WITH_LDAP
30 #include <ldap.h>
31+#endif
32
33 #ifdef WITH_SASL
34 #include <openssl/ssl.h>
35@@ -117,10 +119,12 @@ struct lookup_context {
36
37 #define LDAP_AUTH_USESIMPLE	0x0008
38
39+#ifdef WITH_LDAP
40 /* lookup_ldap.c */
41 LDAP *init_ldap_connection(unsigned logopt, const char *uri, struct lookup_context *ctxt);
42 int unbind_ldap_connection(unsigned logopt, struct ldap_conn *conn, struct lookup_context *ctxt);
43 int authtype_requires_creds(const char *authtype);
44+#endif
45
46 #ifdef WITH_SASL
47 /* cyrus-sasl.c */
48