diff options
author | Bojan Smojver <bojan@apache.org> | 2009-07-16 01:31:17 +0000 |
---|---|---|
committer | Bojan Smojver <bojan@apache.org> | 2009-07-16 01:31:17 +0000 |
commit | bf06d2425c33205be69fc3f7e521ab0c9d202c5e (patch) | |
tree | b4e0d4d466822ddd5786e74e5edc2442fbbf4982 /file_io/unix | |
parent | 47375d23373d3269e7acd4d2e388f113f5831e30 (diff) | |
download | apr-bf06d2425c33205be69fc3f7e521ab0c9d202c5e.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: https://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@794484 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/unix')
-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(); } |