tdb2: allow multiple chain locks.
[ccan] / ccan / tdb2 / test / run-10-simple-store.c
index 760ead3884f0292ebaeca26e8f6bb65fc03486b5..3aeb3816fb09b14e3de5e7e9d1a3f20eea897b35 100644 (file)
@@ -1,5 +1,6 @@
 #include <ccan/failtest/failtest_override.h>
 #include <ccan/tdb2/tdb.c>
+#include <ccan/tdb2/open.c>
 #include <ccan/tdb2/free.c>
 #include <ccan/tdb2/lock.c>
 #include <ccan/tdb2/io.c>
@@ -29,8 +30,8 @@ int main(int argc, char *argv[])
        int flags[] = { TDB_INTERNAL, TDB_DEFAULT, TDB_NOMMAP,
                        TDB_INTERNAL|TDB_CONVERT, TDB_CONVERT, 
                        TDB_NOMMAP|TDB_CONVERT };
-       struct tdb_data key = { (unsigned char *)"key", 3 };
-       struct tdb_data data = { (unsigned char *)"data", 4 };
+       struct tdb_data key = tdb_mkdata("key", 3);
+       struct tdb_data data = tdb_mkdata("data", 4);
 
        failtest_init(argc, argv);
        failtest_hook = suppress_failure;