tdb2: feature support.
[ccan] / ccan / tdb2 / test / run-57-die-during-transaction.c
index 793636a9f6e9c0b30d9fbabfd358febb8bb1efb2..b6c3557ad5eea8934afb208f5d3096cbc2850405 100644 (file)
@@ -1,4 +1,4 @@
-#define _XOPEN_SOURCE 500
+#include "config.h"
 #include <unistd.h>
 #include "lock-tracking.h"
 #include <ccan/tap/tap.h>
@@ -145,6 +145,10 @@ reset:
        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. */