X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftdb%2Ftdb_private.h;h=7482c84f725bcc4ad79fc312dfee82dbb11ffd74;hb=4116b284c098f6c67f62d8292e93d8f73d833e9d;hp=96fdf921f339ad8e58445b41176267aba785799c;hpb=d117f992bde6b7157a8eecbce8a026f2aa7ab4ae;p=ccan diff --git a/ccan/tdb/tdb_private.h b/ccan/tdb/tdb_private.h index 96fdf921..7482c84f 100644 --- a/ccan/tdb/tdb_private.h +++ b/ccan/tdb/tdb_private.h @@ -72,7 +72,7 @@ typedef uint32_t tdb_len_t; typedef uint32_t tdb_off_t; #ifndef offsetof -#define offsetof(t,f) ((unsigned int)&((t *)0)->f) +#define offsetof(t,f) ((size_t)&((t *)0)->f) #endif #define TDB_MAGIC_FOOD "TDB file\n" @@ -82,6 +82,7 @@ typedef uint32_t tdb_off_t; #define TDB_DEAD_MAGIC (0xFEE1DEAD) #define TDB_RECOVERY_MAGIC (0xf53bc0e7U) #define TDB_RECOVERY_INVALID_MAGIC (0x0) +#define TDB_HASH_RWLOCK_MAGIC (0xbad1a51U) #define TDB_ALIGNMENT 4 #define DEFAULT_HASH_SIZE 131 #define FREELIST_TOP (sizeof(struct tdb_header))