-#include "config.h"
+#include <ccan/tdb2/private.h>
#include <unistd.h>
#include "lock-tracking.h"
#include <ccan/tap/tap.h>
#define malloc malloc_noleak
#define free free_noleak
-#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>
-#include <ccan/tdb2/hash.c>
-#include <ccan/tdb2/check.c>
-#include <ccan/tdb2/transaction.c>
+#include "tdb2-source.h"
+
#undef malloc
#undef free
#undef write