Supply declaration of fdatasync if missing

OS X has the function but doesn't have a declaration for it.
This commit is contained in:
Peter Eisentraut 2015-09-28 23:49:24 -04:00 committed by Florian Festi
parent c611487b5d
commit 92ed1c43a4
2 changed files with 5 additions and 0 deletions

View File

@ -560,6 +560,7 @@ dnl Checks for library functions.
AC_CHECK_FUNCS(putenv) AC_CHECK_FUNCS(putenv)
AC_CHECK_FUNCS(mempcpy) AC_CHECK_FUNCS(mempcpy)
AC_CHECK_FUNCS(fdatasync) AC_CHECK_FUNCS(fdatasync)
AC_CHECK_DECLS(fdatasync, [], [], [#include <unistd.h>])
AC_CHECK_FUNCS(lutimes) AC_CHECK_FUNCS(lutimes)
AC_CHECK_FUNCS(mergesort) AC_CHECK_FUNCS(mergesort)
AC_CHECK_FUNCS(getauxval) AC_CHECK_FUNCS(getauxval)

View File

@ -80,6 +80,10 @@ char * stpncpy(char * dest, const char * src, size_t n);
#endif #endif
#endif #endif
#if defined(HAVE_FDATASYNC) && !HAVE_DECL_FDATASYNC
extern int fdatasync(int fildes);
#endif
#include "rpmio/rpmutil.h" #include "rpmio/rpmutil.h"
/* compatibility macros to avoid a mass-renaming all over the codebase */ /* compatibility macros to avoid a mass-renaming all over the codebase */
#define xmalloc(_size) rmalloc((_size)) #define xmalloc(_size) rmalloc((_size))