about summary refs log tree commit diff
path: root/src/libutil/util.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-02-24T15·46+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-02-24T15·46+0000
commit84a4dd5ff08ceb7894d8dce662265d7d188e615c (patch)
tree8a87f32a5cf2ae54d0e8dc448efa4b8536e21482 /src/libutil/util.cc
parent7db2831d3a76bc239bb7a9f7573152ce12413c29 (diff)
* Don't use fdatasync since it doesn't work on Snow Leopard.
* Don't refer to config.h in util.hh, because config.h is not
  installed (http://hydra.nixos.org/build/303053).

Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r--src/libutil/util.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 8c52625a2531..eec60867dfc8 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -233,7 +233,7 @@ void writeFile(const Path & path, const string & s, bool doFsync)
     if (fd == -1)
         throw SysError(format("opening file `%1%'") % path);
     writeFull(fd, (unsigned char *) s.c_str(), s.size());
-    if (doFsync) fdatasync(fd);
+    if (doFsync) fsync(fd);
 }