it can be -1 for unsupported, or 0 for runtime detection (which we don't do).
@@ -43,7 +43,7 @@
# define LEGACY_FLOCK 1
#endif
-#ifndef _POSIX_SYNCHRONIZED_IO
+#if !defined(_POSIX_SYNCHRONIZED_IO) || _POSIX_SYNCHRONIZED_IO <= 0
# define fdatasync fsync
@@ -35,7 +35,7 @@
#include <errno.h>
#include <sys/stat.h>