diff options
author | brane <brane@13f79535-47bb-0310-9956-ffa450edef68> | 2017-04-05 10:18:57 +0000 |
---|---|---|
committer | brane <brane@13f79535-47bb-0310-9956-ffa450edef68> | 2017-04-05 10:18:57 +0000 |
commit | 31df063bfed2558e5eaf1941b4c020c4beff4be7 (patch) | |
tree | a8c2623ab2f9cb870f6157023be04180e3526e82 /file_io | |
parent | 7426b433fbc66f2f8b13a53fcf25fcbd5ddb1e7b (diff) | |
download | libapr-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.c | 2 |
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 |