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/libstore/local-store.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstore') diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 7c8db745cbd8..a83ba55e2b3e 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -240,7 +240,7 @@ void LocalStore::appendReferrer(const Path & from, const Path & to, bool lock) string s = " " + to; writeFull(fd, (const unsigned char *) s.c_str(), s.size()); - if (doFsync) fdatasync(fd); + if (doFsync) fsync(fd); } @@ -271,7 +271,7 @@ void LocalStore::rewriteReferrers(const Path & path, bool purge, PathSet referre writeFull(fd, (const unsigned char *) s.c_str(), s.size()); - if (doFsync) fdatasync(fd); + if (doFsync) fsync(fd); fd.close(); /* for Windows; can't rename open file */ -- cgit 1.4.1