#define HAVE_UTIME_H
#define HAVE_UTIME
#endif
+#ifndef __FreeBSD__
#define _XOPEN_SOURCE 600
+#endif
#include "config.h"
#include <unistd.h>
return 0;
}
+
+/**
+ * Flush a database file from the page cache.
+ **/
+int tdb_flush(struct tdb_context *tdb)
+{
+ if (tdb->fd != -1)
+ return fsync(tdb->fd);
+ return 0;
+}