summaryrefslogtreecommitdiff
path: root/file_io
diff options
context:
space:
mode:
authorbrane <brane@13f79535-47bb-0310-9956-ffa450edef68>2017-04-05 10:18:57 +0000
committerbrane <brane@13f79535-47bb-0310-9956-ffa450edef68>2017-04-05 10:18:57 +0000
commit31df063bfed2558e5eaf1941b4c020c4beff4be7 (patch)
treea8c2623ab2f9cb870f6157023be04180e3526e82 /file_io
parent7426b433fbc66f2f8b13a53fcf25fcbd5ddb1e7b (diff)
downloadlibapr-31df063bfed2558e5eaf1941b4c020c4beff4be7.tar.gz
Do not try to use fdatasync() on macOS.
Use the platform-specific fcntl(fd, F_FULLFSYNC) instead. See http://apr.markmail.org/thread/hlgqd5yr6j4auxol git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1790200 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r--file_io/unix/readwrite.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/file_io/unix/readwrite.c b/file_io/unix/readwrite.c
index dd424cd64..f9c7b06bd 100644
--- a/file_io/unix/readwrite.c
+++ b/file_io/unix/readwrite.c
@@ -476,6 +476,8 @@ APR_DECLARE(apr_status_t) apr_file_datasync(apr_file_t *thefile)
#ifdef HAVE_FDATASYNC
if (fdatasync(thefile->filedes)) {
+#elif defined(F_FULLFSYNC)
+ if (fcntl(thefile->filedes, F_FULLFSYNC)) {
#else
if (fsync(thefile->filedes)) {
#endif