diff options
author | Richard Sharpe <sharpe@samba.org> | 2004-04-10 06:10:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:51:11 -0500 |
commit | 177777b05534c86514f5ee79b67532537bfd99dd (patch) | |
tree | 9078e1df6b1f030d1caebf25a01847da00407434 /source4/lib/ldb | |
parent | fdcafdef0e1dc1215eec5d99b0c36cfca04ac055 (diff) | |
download | samba-177777b05534c86514f5ee79b67532537bfd99dd.tar.gz samba-177777b05534c86514f5ee79b67532537bfd99dd.tar.bz2 samba-177777b05534c86514f5ee79b67532537bfd99dd.zip |
r141: A number of changes to get things working on FreeBSD and reduce the breakage
caused by someone recently ...
1. Add configure check HAVE_COMPARISON_FN_T to see if this is defined. I
have not checked this on Linux yet, but will do so soon.
2. Add the definitions of malloc_p, realloc_p etc.
3. Check for LDAP and don't build stuff that depends on LDAP if we don't\
have it.
It currently builds on FreeBSD but there is one warning printed out at the end.
(This used to be commit 7b34fbe0f2ef175e5504e34e4f3cdf9a0563970f)
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r-- | source4/lib/ldb/common/ldb.c | 2 | ||||
-rw-r--r-- | source4/lib/ldb/ldb_ldap/ldb_ldap.c | 4 | ||||
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_pack.c | 2 | ||||
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_search.c | 2 | ||||
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_tdb.c | 2 |
5 files changed, 8 insertions, 4 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index 90b77e1e7f..3ba4434e07 100644 --- a/source4/lib/ldb/common/ldb.c +++ b/source4/lib/ldb/common/ldb.c @@ -52,9 +52,11 @@ struct ldb_context *ldb_connect(const char *url, unsigned int flags, return ltdb_connect(url, flags, options); } +#ifdef HAVE_LDAP if (strncmp(url, "ldap", 4) == 0) { return lldb_connect(url, flags, options); } +#endif /*HAVE_LDAP*/ errno = EINVAL; return NULL; diff --git a/source4/lib/ldb/ldb_ldap/ldb_ldap.c b/source4/lib/ldb/ldb_ldap/ldb_ldap.c index e6cbb52cad..25dad914da 100644 --- a/source4/lib/ldb/ldb_ldap/ldb_ldap.c +++ b/source4/lib/ldb/ldb_ldap/ldb_ldap.c @@ -33,7 +33,8 @@ */ #include "includes.h" -#include "ldb_ldap/ldb_ldap.h" +#if HAVE_LDAP +#include "ldb_ldap.h" #if 0 /* @@ -518,3 +519,4 @@ failed: if (ldb) free(ldb); return NULL; } +#endif /*HAVE_LDAP*/ diff --git a/source4/lib/ldb/ldb_tdb/ldb_pack.c b/source4/lib/ldb/ldb_tdb/ldb_pack.c index 1b0c8a1857..5964e0751d 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_pack.c +++ b/source4/lib/ldb/ldb_tdb/ldb_pack.c @@ -33,7 +33,7 @@ */ #include "includes.h" -#include "ldb_tdb/ldb_tdb.h" +#include "ldb_tdb.h" /* change this if the data format ever changes */ #define LTDB_PACKING_FORMAT 0x26011966 diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c index d7a7b7ffbd..5905231b32 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_search.c +++ b/source4/lib/ldb/ldb_tdb/ldb_search.c @@ -33,7 +33,7 @@ */ #include "includes.h" -#include "ldb_tdb/ldb_tdb.h" +#include "ldb_tdb.h" /* free a message that has all parts separately allocated diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c index 95dce498f1..ec90eec03f 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c @@ -33,7 +33,7 @@ */ #include "includes.h" -#include "ldb_tdb/ldb_tdb.h" +#include "ldb_tdb.h" /* form a TDB_DATA for a record key |