From 84a4dd5ff08ceb7894d8dce662265d7d188e615c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 24 Feb 2010 15:46:06 +0000 Subject: * 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). --- src/libutil/util.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libutil/util.cc') 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); } -- cgit 1.4.1