diff options
-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 { |