about summary refs log tree commit diff
path: root/src/libutil
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/util.cc2
-rw-r--r--src/libutil/util.hh6
2 files changed, 1 insertions, 7 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);
 }
 
 
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index 90132da73317..f609e8944ba8 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -1,8 +1,6 @@
 #ifndef __UTIL_H
 #define __UTIL_H
 
-#include "config.h"
-
 #include "types.hh"
 
 #include <sys/types.h>
@@ -12,10 +10,6 @@
 
 #include <cstdio>
 
-#ifndef HAVE_FDATASYNC
-#define fdatasync fsync
-#endif
-
 
 namespace nix {