mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 18:54:13 +08:00
mdbx: use F_FULLFSYNC on MacOS.
This commit is contained in:
parent
691898d129
commit
226cb3ac90
@ -664,6 +664,9 @@ int mdbx_filesync(mdbx_filehandle_t fd, bool filesize_changed) {
|
|||||||
#if defined(_WIN32) || defined(_WIN64)
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
(void)filesize_changed;
|
(void)filesize_changed;
|
||||||
return FlushFileBuffers(fd) ? MDBX_SUCCESS : GetLastError();
|
return FlushFileBuffers(fd) ? MDBX_SUCCESS : GetLastError();
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
(void)filesize_changed;
|
||||||
|
return likely(fcntl(fd, F_FULLFSYNC) != -1) ? MDBX_SUCCESS : errno;
|
||||||
#else
|
#else
|
||||||
int rc;
|
int rc;
|
||||||
do {
|
do {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user