diff options
author | bojan <bojan@13f79535-47bb-0310-9956-ffa450edef68> | 2009-07-16 01:31:17 +0000 |
---|---|---|
committer | bojan <bojan@13f79535-47bb-0310-9956-ffa450edef68> | 2009-07-16 01:31:17 +0000 |
commit | 6efb9cd0e7e6ab102757ad6c9f88a97cfaf2a620 (patch) | |
tree | b4e0d4d466822ddd5786e74e5edc2442fbbf4982 /file_io | |
parent | 6975bab4dc973660071dd3a0a7005e4e951744ec (diff) | |
download | libapr-6efb9cd0e7e6ab102757ad6c9f88a97cfaf2a620.tar.gz |
Backport r793192 and r794118 from the trunk.
Link again on OS X, where fdatasync() does not seem to exist.
* configure.in
Add check for fdatasync.
* file_io/unix/readwrite.c
(apr_file_datasync): Use fsync when fdatasync is not available.
Move check for fdatasync out of extended file descriptor handling block.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@794484 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r-- | file_io/unix/readwrite.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/file_io/unix/readwrite.c b/file_io/unix/readwrite.c index f73c50b54..f2e07534f 100644 --- a/file_io/unix/readwrite.c +++ b/file_io/unix/readwrite.c @@ -381,7 +381,11 @@ APR_DECLARE(apr_status_t) apr_file_datasync(apr_file_t *thefile) } } +#ifdef HAVE_FDATASYNC if (fdatasync(thefile->filedes)) { +#else + if (fsync(thefile->filedes)) { +#endif rv = apr_get_os_error(); } |