Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,21 @@ AC_CHECK_FUNCS([fsync])

# A more comprehensive check that fdatasync exits
# Necessary for platforms that have fdatasync in headers but have no
# implementation
# implementation. Use -Werror=implicit-function-declaration for platforms
# that don't have fdatasync at all.
dnl Originally provided by user copiousfreetime for the beanstalkd project
dnl {{{ make sure that fdatasync exits
AC_CACHE_CHECK([for fdatasync],[ac_cv_func_fdatasync],[
saved_cflags="$CFLAGS"
CFLAGS="$CFLAGS -Werror=implicit-function-declaration"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <unistd.h>
]],[[
fdatasync(4);
]])],
[ac_cv_func_fdatasync=yes],
[ac_cv_func_fdatasync=no])
CFLAGS="$saved_cflags"
])
AS_IF([test "x${ac_cv_func_fdatasync}" = "xyes"],
[AC_DEFINE([HAVE_FDATASYNC],[1],[If the system defines fdatasync])])
Expand Down