diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-02-02T11·57+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-02-02T11·57+0000 |
commit | 2723d9b56e2ea15c0c753ae579849806102f4ce0 (patch) | |
tree | 18e38b8e19f4e3e4bbf6364ed04a6f7f641107fd | |
parent | 07ffdc28629e537c3811f86b83a93655b73909ec (diff) |
* If fdatasync() isn't available, use fsync().
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | src/libutil/util.hh | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 46036113b81b..f6d983fda839 100644 --- a/configure.ac +++ b/configure.ac @@ -262,6 +262,7 @@ AC_CHECK_FUNCS([setresuid setreuid lchown]) # Nice to have, but not essential. AC_CHECK_FUNCS([strsignal]) AC_CHECK_FUNCS([posix_fallocate]) +AC_CHECK_FUNCS([fdatasync]) # This is needed if ATerm or bzip2 are static libraries, diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 837382433af9..90132da73317 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -12,6 +12,10 @@ #include <cstdio> +#ifndef HAVE_FDATASYNC +#define fdatasync fsync +#endif + namespace nix { |