r18834: get the log context code right
authorAndrew Tridgell <tridge@samba.org>
Sat, 23 Sep 2006 01:59:48 +0000 (01:59 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:19:16 +0000 (14:19 -0500)
source/lib/ldb/ldb_tdb/ldb_tdb_wrap.c

index 654afea2f158d001eb17ec28d697ee2b55aa5af1..b28bf7745077c63e496ca39bc43ec46c07bfb984 100644 (file)
@@ -122,11 +122,11 @@ struct tdb_context *ltdb_wrap_open(TALLOC_CTX *mem_ctx,
 {
        struct ltdb_wrap *w;
        struct stat st;
-#if (_SAMBA_BUILD_ <= 3)
+#if defined(_SAMBA_BUILD_) && (_SAMBA_BUILD_ <= 3)
        tdb_log_func log_ctx_p = ltdb_log_fn;
 #else
        struct tdb_logging_context log_ctx;
-       struct tdb_logging_context log_ctx_p = &log_ctx;
+       const struct tdb_logging_context *log_ctx_p = &log_ctx;
        log_ctx.log_fn = ltdb_log_fn;
        log_ctx.log_private = ldb;
 #endif