Skip to content

Commit

Permalink
Fix detection of fdatasync on OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
copiousfreetime committed Oct 11, 2009
1 parent 12f05f6 commit 68038c5
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,19 @@ else
LIBS="$LIBS -levent"

AC_CHECK_FUNCS([posix_fallocate])
AC_CHECK_FUNCS([fdatasync])
dnl {{{ make sure that fdatasync exits
AC_CACHE_CHECK([for fdatasync],[ac_cv_func_fdatasync],[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <unistd.h>
]],[[
fdatasync(4);
]])],
[ac_cv_func_fdatasync=yes],
[ac_cv_func_fdatasync=no])
])
AS_IF([test "x${ac_cv_func_fdatasync}" = "xyes"],
[AC_DEFINE([HAVE_FDATASYNC],[1],[If the system defines fdatasync])])
dnl }}}

AC_CHECK_LIB([socket], [bind], [
LIBS="$LIBS -lsocket"
Expand Down

0 comments on commit 68038c5

Please sign in to comment.