From 6b3f9ac0f878199ba0ab6855a65fda369e95ae27 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 20 Jun 2011 18:40:33 +0930 Subject: tdb2: minor changes to SAMBIFY it. This is a bit messy, but it works. Kept as a separate patch so it's easier to merge back and forth with CCAN's tdb2. Signed-off-by: Rusty Russell --- lib/tdb2/private.h | 18 ++++++++++++++---- lib/tdb2/tdb.c | 2 ++ lib/tdb2/tdb2.h | 2 ++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/lib/tdb2/private.h b/lib/tdb2/private.h index 135e3df936..0c3e441657 100644 --- a/lib/tdb2/private.h +++ b/lib/tdb2/private.h @@ -22,6 +22,19 @@ #if HAVE_FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 #endif +#include +#include +#include +#include "tdb2.h" + +#ifdef _SAMBA_BUILD_ +#include "replace.h" +#include "system/filesys.h" +#include "system/time.h" +#include "system/shmem.h" +#include "system/select.h" +#include "system/wait.h" +#else #include #include #include @@ -35,10 +48,7 @@ #include #include #include -#include -#include -#include -#include +#endif #ifndef TEST_IT #define TEST_IT(cond) diff --git a/lib/tdb2/tdb.c b/lib/tdb2/tdb.c index b8b5aac128..753ccb0c8b 100644 --- a/lib/tdb2/tdb.c +++ b/lib/tdb2/tdb.c @@ -1,6 +1,8 @@ #include "private.h" +#ifndef _SAMBA_BUILD_ #include #include +#endif static enum TDB_ERROR update_rec_hdr(struct tdb_context *tdb, tdb_off_t off, diff --git a/lib/tdb2/tdb2.h b/lib/tdb2/tdb2.h index c6e09e9f16..3f80793d76 100644 --- a/lib/tdb2/tdb2.h +++ b/lib/tdb2/tdb2.h @@ -42,6 +42,8 @@ extern "C" { #include /* For memcmp */ #include +#else +#include "replace.h" #endif #include #include -- cgit