mirror of
https://github.com/urbit/shrub.git
synced 2024-12-20 17:32:11 +03:00
Merge pull request #4615 from urbit/jb/darwin-fsync
build: patch lmdb to use F_FULLFSYNC on darwin
This commit is contained in:
commit
aa77e21579
@ -25,4 +25,11 @@ in {
|
||||
ldapSupport = false;
|
||||
brotliSupport = false;
|
||||
};
|
||||
|
||||
lmdb = prev.lmdb.overrideAttrs (attrs: {
|
||||
patches =
|
||||
optionalList attrs.patches ++ prev.lib.optional prev.stdenv.isDarwin [
|
||||
../pkgs/lmdb/darwin-fsync.patch
|
||||
];
|
||||
});
|
||||
}
|
||||
|
13
nix/pkgs/lmdb/darwin-fsync.patch
Normal file
13
nix/pkgs/lmdb/darwin-fsync.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c
|
||||
index fe65e30..0070215 100644
|
||||
--- a/libraries/liblmdb/mdb.c
|
||||
+++ b/libraries/liblmdb/mdb.c
|
||||
@@ -2526,7 +2526,7 @@ mdb_env_sync(MDB_env *env, int force)
|
||||
rc = ErrCode();
|
||||
} else
|
||||
#endif
|
||||
- if (MDB_FDATASYNC(env->me_fd))
|
||||
+ if (fcntl(env->me_fd, F_FULLFSYNC, 0))
|
||||
rc = ErrCode();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user