From cca2c91058047ce6328ed7523aeef2417359e63a Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Mon, 4 Mar 2019 13:34:38 +0300 Subject: [PATCH] mdbx: don't check __GLIBC_PREREQ/_BSD_SOURCE/_XOPEN_SOURCE for use fsync (musl). --- src/osal.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/osal.c b/src/osal.c index 925c43b9..be65bf99 100644 --- a/src/osal.c +++ b/src/osal.c @@ -673,8 +673,7 @@ int mdbx_filesync(mdbx_filehandle_t fd, bool filesize_changed) { #if defined(_WIN32) || defined(_WIN64) (void)filesize_changed; return FlushFileBuffers(fd) ? MDBX_SUCCESS : GetLastError(); -#elif __GLIBC_PREREQ(2, 16) || _BSD_SOURCE || _XOPEN_SOURCE || \ - (__GLIBC_PREREQ(2, 8) && _POSIX_C_SOURCE >= 200112L) +#else for (;;) { /* 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 @@ -699,8 +698,6 @@ int mdbx_filesync(mdbx_filehandle_t fd, bool filesize_changed) { if (rc != EINTR) return rc; } -#else -#error FIXME #endif }