]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb/tdb_private.h
tdb: fix backwards check on HAVE_PAGESIZE
[ccan] / ccan / tdb / tdb_private.h
index a31bf363887a7e82511efc3d114d550ef1aab1d1..228e8dcf9b09eaedf64fd166b8a683deb50070a0 100644 (file)
@@ -64,7 +64,7 @@
 #define __location__ __FILE__ ":" __STRINGSTRING(__LINE__)
 #endif
 
-#if HAVE_GETPAGESIZE
+#if !HAVE_GETPAGESIZE
 #define getpagesize() 0x2000
 #endif
 
@@ -282,6 +282,7 @@ int tdb_ofs_read(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d);
 int tdb_ofs_write(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d);
 int tdb_lock_record(struct tdb_context *tdb, tdb_off_t off);
 int tdb_unlock_record(struct tdb_context *tdb, tdb_off_t off);
+bool tdb_needs_recovery(struct tdb_context *tdb);
 int tdb_rec_read(struct tdb_context *tdb, tdb_off_t offset, struct tdb_record *rec);
 int tdb_rec_write(struct tdb_context *tdb, tdb_off_t offset, struct tdb_record *rec);
 int tdb_do_delete(struct tdb_context *tdb, tdb_off_t rec_ptr, struct tdb_record *rec);