aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers/unix
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-02-26 18:10:38 +0100
committerBjörn-Egil Dahlberg <[email protected]>2016-03-15 12:31:51 +0100
commit3c7e658ac4c497cd154bea4178fd560561c78d0c (patch)
treec91c040b1a551d9913ee448325608038e9899718 /erts/emulator/drivers/unix
parent10a218b37324fd94ddbfe5568554de263492c82c (diff)
downloadotp-3c7e658ac4c497cd154bea4178fd560561c78d0c.tar.gz
otp-3c7e658ac4c497cd154bea4178fd560561c78d0c.tar.bz2
otp-3c7e658ac4c497cd154bea4178fd560561c78d0c.zip
erts: Use fcntl(fd, F_FULLFSYNC) instead of fdatasync on Mac OSX
The syscall fdatasync does not work as intended on Mac OSX. Both the function fsync and fdatasync now uses fcntl(fd, F_FULLFSYNC) on Mac OSX.
Diffstat (limited to 'erts/emulator/drivers/unix')
-rw-r--r--erts/emulator/drivers/unix/unix_efile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/drivers/unix/unix_efile.c b/erts/emulator/drivers/unix/unix_efile.c
index 00da48b107..ac9b681d03 100644
--- a/erts/emulator/drivers/unix/unix_efile.c
+++ b/erts/emulator/drivers/unix/unix_efile.c
@@ -467,7 +467,7 @@ int
efile_fdatasync(Efile_error *errInfo, /* Where to return error codes. */
int fd) /* File descriptor for file to sync data. */
{
-#ifdef HAVE_FDATASYNC
+#if defined(HAVE_FDATASYNC) && !defined(__DARWIN__)
return check_error(fdatasync(fd), errInfo);
#else
return efile_fsync(errInfo, fd);