mirror of
https://github.com/urbit/shrub.git
synced 2024-11-24 13:06:09 +03:00
build: patch lmdb to use F_FULLFSYNC on darwin
This commit is contained in:
parent
a8437da8c1
commit
027c5d4603
@ -25,4 +25,15 @@ in {
|
|||||||
ldapSupport = false;
|
ldapSupport = false;
|
||||||
brotliSupport = false;
|
brotliSupport = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
lmdb = prev.lmdb.overrideAttrs (attrs: {
|
||||||
|
patches =
|
||||||
|
if builtins.currentSystem != "x86_64-darwin"
|
||||||
|
then
|
||||||
|
attrs.patches
|
||||||
|
else
|
||||||
|
optionalList attrs.patches ++ [
|
||||||
|
../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