The msync manpage reports that msync *must* be called before munmap. Failure to do...
[samba.git] / source4 / lib / tdb / common / transaction.c
index 4e2127be64484cbcb5faee1a6e5682c08425f26a..7acda640c8d32338de6e8651971d5f848740aae6 100644 (file)
@@ -563,7 +563,7 @@ static int transaction_sync(struct tdb_context *tdb, tdb_off_t offset, tdb_len_t
                TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction: fsync failed\n"));
                return -1;
        }
-#ifdef MS_SYNC
+#ifdef HAVE_MMAP
        if (tdb->map_ptr) {
                tdb_off_t moffset = offset & ~(tdb->page_size-1);
                if (msync(moffset + (char *)tdb->map_ptr,