tdb: make tdb_private.h idempotent.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 13 Feb 2012 17:34:43 +0000 (04:04 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 13 Feb 2012 17:34:43 +0000 (04:04 +1030)
The most convenient way to write unit tests in C is to directly
#include the C files (CCAN uses this, for example).  That works quite
well, but it means that tdb_private.h now needs to be protected
against multiple inclusions.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
lib/tdb/common/tdb_private.h

index 4fc7381aa041201d87ae815d715f25e861e53b4e..9913284f3c7bcad8fc0dbc6dd15ca1c6e2465743 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef TDB_PRIVATE_H
+#define TDB_PRIVATE_H
  /* 
    Unix SMB/CIFS implementation.
 
@@ -280,3 +282,4 @@ void tdb_header_hash(struct tdb_context *tdb,
                     uint32_t *magic1_hash, uint32_t *magic2_hash);
 unsigned int tdb_old_hash(TDB_DATA *key);
 size_t tdb_dead_space(struct tdb_context *tdb, tdb_off_t off);
+#endif /* TDB_PRIVATE_H */