diff options
author | Gregor Beck <gbeck@sernet.de> | 2011-10-25 16:32:12 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-11-25 13:24:34 +0100 |
commit | a719ce7c11c2c8c8b006c94b4559ef5e8addbc1a (patch) | |
tree | bb31807c4c164e4a9335ffcbc1abe234ab04430e /source3/lib/dbwrap | |
parent | 90eb2eb1789e430b4ad8c849d7df99f5d8315a06 (diff) | |
download | samba-a719ce7c11c2c8c8b006c94b4559ef5e8addbc1a.tar.gz samba-a719ce7c11c2c8c8b006c94b4559ef5e8addbc1a.tar.bz2 samba-a719ce7c11c2c8c8b006c94b4559ef5e8addbc1a.zip |
s3:dbwrap: do not burden the user of db_open_ctdb with ifdef voodoo
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/lib/dbwrap')
-rw-r--r-- | source3/lib/dbwrap/dbwrap_ctdb.c | 13 | ||||
-rw-r--r-- | source3/lib/dbwrap/dbwrap_ctdb.h | 3 |
2 files changed, 13 insertions, 3 deletions
diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c index 38a339536e..aae5c065f6 100644 --- a/source3/lib/dbwrap/dbwrap_ctdb.c +++ b/source3/lib/dbwrap/dbwrap_ctdb.c @@ -22,6 +22,7 @@ #include "system/filesys.h" #include "lib/util/tdb_wrap.h" #include "util_tdb.h" +#include "dbwrap/dbwrap_ctdb.h" #include "dbwrap/dbwrap_rbt.h" #include "lib/param/param.h" @@ -1526,4 +1527,16 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx, return result; } + +#else /* CLUSTER_SUPPORT */ + +struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx, + const char *name, + int hash_size, int tdb_flags, + int open_flags, mode_t mode) +{ + DEBUG(3, ("db_open_ctdb: no cluster support!\n")); + return NULL; +} + #endif diff --git a/source3/lib/dbwrap/dbwrap_ctdb.h b/source3/lib/dbwrap/dbwrap_ctdb.h index 13ce140489..7898818ae4 100644 --- a/source3/lib/dbwrap/dbwrap_ctdb.h +++ b/source3/lib/dbwrap/dbwrap_ctdb.h @@ -21,8 +21,6 @@ #ifndef __DBWRAP_CTDB_H__ #define __DBWRAP_CTDB_H__ -#ifdef CLUSTER_SUPPORT - #include <talloc.h> struct db_context; @@ -31,6 +29,5 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx, const char *name, int hash_size, int tdb_flags, int open_flags, mode_t mode); -#endif /* CLUSTER_SUPPORT */ #endif /* __DBWRAP_CTDB_H__ */ |