mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 17:14:12 +08:00
mdbx: don't check __GLIBC_PREREQ/_BSD_SOURCE/_XOPEN_SOURCE for use fsync (musl).
This commit is contained in:
parent
46b551e386
commit
cca2c91058
@ -673,8 +673,7 @@ 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 __GLIBC_PREREQ(2, 16) || _BSD_SOURCE || _XOPEN_SOURCE || \
|
#else
|
||||||
(__GLIBC_PREREQ(2, 8) && _POSIX_C_SOURCE >= 200112L)
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
/* LY: It is no reason to use fdatasync() here, even in case
|
/* LY: It is no reason to use fdatasync() here, even in case
|
||||||
* no such bug in a kernel. Because "no-bug" mean that a kernel
|
* no such bug in a kernel. Because "no-bug" mean that a kernel
|
||||||
@ -699,8 +698,6 @@ int mdbx_filesync(mdbx_filehandle_t fd, bool filesize_changed) {
|
|||||||
if (rc != EINTR)
|
if (rc != EINTR)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
#error FIXME
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user