Add define guards around otherwise unused variable.
[ira/wip.git] / lib / tdb / common / open.c
index 2dcdd4bde74aca7cc4c2fcec175a113f475b8ee6..2e6a707497b85003159d7a02a7fa278859e64df8 100644 (file)
@@ -407,7 +407,10 @@ void *tdb_get_logging_private(struct tdb_context *tdb)
 
 static int tdb_reopen_internal(struct tdb_context *tdb, bool active_lock)
 {
+#if !defined(LIBREPLACE_PREAD_NOT_REPLACED) || \
+       !defined(LIBREPLACE_PWRITE_NOT_REPLACED)
        struct stat st;
+#endif
 
        if (tdb->flags & TDB_INTERNAL) {
                return 0; /* Nothing to do. */