From 9f410597dfa062bbd66c4863a31b402de03aa6a6 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Mon, 4 Mar 2019 13:39:33 +0300 Subject: [PATCH] mdbx: checking only _POSIX_SYNCHRONIZED_IO for fdatasync (musl). --- src/osal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/osal.c b/src/osal.c index be65bf99..f230faff 100644 --- a/src/osal.c +++ b/src/osal.c @@ -685,8 +685,7 @@ int mdbx_filesync(mdbx_filehandle_t fd, bool filesize_changed) { * * For more info about of a corresponding fdatasync() bug * see http://www.spinics.net/lists/linux-ext4/msg33714.html */ -#if _POSIX_C_SOURCE >= 199309L || _XOPEN_SOURCE >= 500 || \ - defined(_POSIX_SYNCHRONIZED_IO) +#if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0 if (!filesize_changed && fdatasync(fd) == 0) return MDBX_SUCCESS; #else