-#define _XOPEN_SOURCE 500
+#include "config.h"
#include <unistd.h>
#include "lock-tracking.h"
#include <ccan/tap/tap.h>
#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>
unlink(TEST_DBNAME);
tdb = tdb_open(TEST_DBNAME, TDB_NOMMAP,
O_CREAT|O_TRUNC|O_RDWR, 0600, &tap_log_attr);
+ if (!tdb) {
+ diag("Failed opening TDB: %s", strerror(errno));
+ return false;
+ }
if (setjmp(jmpbuf) != 0) {
/* We're partway through. Simulate our death. */