From f435538576878cca81af42e34979a6e4125fe136 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 13 Feb 2010 12:57:13 +1100 Subject: libreplace: add fdatasync() if not available --- lib/replace/libreplace.m4 | 2 +- lib/replace/replace.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') 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 ]) AC_HAVE_DECL(setresgid, [#include ]) AC_HAVE_DECL(errno, [#include ]) 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 */ -- cgit