summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;