summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2011-11-28 12:31:29 -0500
committerTheodore Ts'o <tytso@mit.edu>2011-11-28 12:31:29 -0500
commitdb40c20e3fd66d90d29a41bef9eb20d1e0745906 (patch)
treec18e2b7eb5a6f466b9c9377025ec033936f80aa6 /lib
parentebd0a16a24e60e781ae4c1ad6dc415011f3c65f6 (diff)
downloade2fsprogs-db40c20e3fd66d90d29a41bef9eb20d1e0745906.tar.gz
configure: check for msync() for portability reasons
Turns out the Hurd defines MS_SYNC but doesn't define msync(). Go figure. So check for both. Reported by Svante Signell. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'lib')
-rw-r--r--lib/ext2fs/tdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ext2fs/tdb.c b/lib/ext2fs/tdb.c
index 25ce7924..79534eb4 100644
--- a/lib/ext2fs/tdb.c
+++ b/lib/ext2fs/tdb.c
@@ -1752,7 +1752,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
+#if defined(HAVE_MSYNC) && defined(MS_SYNC)
if (tdb->map_ptr) {
tdb_off_t moffset = offset & ~(tdb->page_size-1);
if (msync(moffset + (char *)tdb->map_ptr,