summaryrefslogtreecommitdiff
path: root/lib/replace
diff options
context:
space:
mode:
Diffstat (limited to 'lib/replace')
-rw-r--r--lib/replace/libreplace.m42
-rw-r--r--lib/replace/replace.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4
index 7a26deb611..d7873dbb67 100644
--- a/lib/replace/libreplace.m4
+++ b/lib/replace/libreplace.m4
@@ -109,7 +109,7 @@ AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror)
AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename)
AC_CHECK_FUNCS(waitpid wait4 strlcpy strlcat initgroups memmove strdup)
AC_CHECK_FUNCS(pread pwrite strndup strcasestr strtok_r mkdtemp dup2 dprintf vdprintf)
-AC_CHECK_FUNCS(isatty chown lchown link readlink symlink realpath)
+AC_CHECK_FUNCS(isatty chown lchown link readlink symlink realpath fdatasync)
AC_HAVE_DECL(setresuid, [#include <unistd.h>])
AC_HAVE_DECL(setresgid, [#include <unistd.h>])
AC_HAVE_DECL(errno, [#include <errno.h>])
diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index baf2368130..a4ef231385 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -729,4 +729,8 @@ char *ufc_crypt(const char *key, const char *salt);
#endif
#endif
+#ifndef HAVE_FDATASYNC
+#define fdatasync(fd) fsync(fd)
+#endif
+
#endif /* _LIBREPLACE_REPLACE_H */