-#include "config.h"
+#include <ccan/tdb2/private.h>
#include <unistd.h>
#include "lock-tracking.h"
#define fcntl fcntl_with_lockcheck
#define ftruncate ftruncate_check
-#include <ccan/tdb2/tdb.c>
-#include <ccan/tdb2/free.c>
-#include <ccan/tdb2/lock.c>
-#include <ccan/tdb2/io.c>
-#include <ccan/tdb2/hash.c>
-#include <ccan/tdb2/check.c>
-#include <ccan/tdb2/transaction.c>
+#include "tdb2-source.h"
#include <ccan/tap/tap.h>
#include <stdlib.h>
#include <stdbool.h>
opened = true;
ok1(tdb_transaction_start(tdb) == 0);
- key.dsize = strlen("hi");
- key.dptr = (void *)"hi";
- data.dptr = (void *)"world";
- data.dsize = strlen("world");
+ key = tdb_mkdata("hi", strlen("hi"));
+ data = tdb_mkdata("world", strlen("world"));
ok1(tdb_store(tdb, key, data, TDB_INSERT) == 0);
ok1(tdb_transaction_commit(tdb) == 0);