summaryrefslogtreecommitdiff
path: root/lib/tdb
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-06-03 19:05:43 +0200
committerGünther Deschner <gd@samba.org>2010-07-01 23:14:57 +0200
commitf7a3bd4fa42eba56675c46d0a2baf0dccded8018 (patch)
treea9eaa2cf98c14654586814ee7713da9f8aa173bc /lib/tdb
parenteb634e8c7fcce424186514a8e0a8a799d6e7fc8d (diff)
downloadsamba-f7a3bd4fa42eba56675c46d0a2baf0dccded8018.tar.gz
samba-f7a3bd4fa42eba56675c46d0a2baf0dccded8018.tar.bz2
samba-f7a3bd4fa42eba56675c46d0a2baf0dccded8018.zip
tdb: fix the build on mac os x 10.6.4.
Guenther
Diffstat (limited to 'lib/tdb')
-rw-r--r--lib/tdb/common/transaction.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/tdb/common/transaction.c b/lib/tdb/common/transaction.c
index 304a03fa38..ebf1cec5f2 100644
--- a/lib/tdb/common/transaction.c
+++ b/lib/tdb/common/transaction.c
@@ -548,7 +548,11 @@ static int transaction_sync(struct tdb_context *tdb, tdb_off_t offset, tdb_len_t
return 0;
}
+#ifdef HAVE_FDATASYNC
if (fdatasync(tdb->fd) != 0) {
+#else
+ if (fsync(tdb->fd) != 0) {
+#endif
tdb->ecode = TDB_ERR_IO;
TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction: fsync failed\n"));
return -1;