summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-12-01 00:01:36 +0100
committerGünther Deschner <gd@samba.org>2009-12-02 00:38:03 +0100
commit53744f01dc7f74f87e4c71057cc175e4c47d3a67 (patch)
tree30dc1022fcff88e443f0c4a496c546c54d2e2566 /source3
parentecb071ca2a00d1b35ace2a4f8924f2af2ba34328 (diff)
downloadsamba-53744f01dc7f74f87e4c71057cc175e4c47d3a67.tar.gz
samba-53744f01dc7f74f87e4c71057cc175e4c47d3a67.tar.bz2
samba-53744f01dc7f74f87e4c71057cc175e4c47d3a67.zip
s3: Cope with older external libtdb
Diffstat (limited to 'source3')
-rw-r--r--source3/configure.in10
-rw-r--r--source3/lib/ldb/ldb_tdb/ldb_tdb.c2
2 files changed, 12 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 9317685fc3..de30f143a9 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -2006,6 +2006,16 @@ then
AC_SUBST(TDBTOOL)
TDBTORTURE="bin/tdbtorture\$(EXEEXT)"
AC_SUBST(TDBTORTURE)
+ ac_cv_have_tdb_err_nesting=yes
+else
+ AC_TRY_COMPILE([#include "tdb.h"],
+ [enum TDB_ERROR err = TDB_ERR_NESTING],
+ ac_cv_have_tdb_err_nesting=yes,
+ ac_cv_have_tdb_err_nesting=no)
+fi
+
+if test x"$ac_cv_have_tdb_err_nesting" = xyes; then
+ AC_DEFINE(HAVE_TDB_ERR_NESTING, 1, [Whether we have TDB_ERR_NESTING])
fi
SMB_LIBRARY(netapi, 0)
diff --git a/source3/lib/ldb/ldb_tdb/ldb_tdb.c b/source3/lib/ldb/ldb_tdb/ldb_tdb.c
index 6bebb6df1c..e3bc069d9d 100644
--- a/source3/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source3/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -59,7 +59,9 @@ static int ltdb_err_map(enum TDB_ERROR tdb_code)
case TDB_ERR_CORRUPT:
case TDB_ERR_OOM:
case TDB_ERR_EINVAL:
+#if HAVE_TDB_ERR_NESTING
case TDB_ERR_NESTING:
+#endif
return LDB_ERR_OPERATIONS_ERROR;
case TDB_ERR_IO:
return LDB_ERR_PROTOCOL_ERROR;