X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.ac;h=df219553ac8f746bb4dfe3d2976eed1681310fbe;hb=a06692172dd04c95f264c7bff81d69ca02294d70;hp=8e64c11a93831303510248901aa37838b6bc4c7f;hpb=f3df7df77761c610c9ba328fac01619f4e7b563f;p=rrdtool.git diff --git a/configure.ac b/configure.ac index 8e64c11..df21955 100644 --- a/configure.ac +++ b/configure.ac @@ -71,8 +71,9 @@ char *strchr (), *strrchr (); #endif /* enable posix_fadvise on linux */ -#ifdef HAVE_POSIX_FADVISE +#if defined(HAVE_POSIX_FADVISE) && defined(HAVE_FCNTL_H) #define __USE_XOPEN2K 1 +#include #endif #ifdef NO_NULL_REALLOC @@ -247,7 +248,7 @@ AC_C_BIGENDIAN dnl for each function found we get a definition in config.h dnl of the form HAVE_FUNCTION -AC_CHECK_FUNCS(tzset mbstowcs opendir readdir chdir chroot getuid setlocale strerror strerror_r snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday posix_fadvise) +AC_CHECK_FUNCS(tzset mbstowcs opendir readdir chdir chroot getuid setlocale strerror strerror_r snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday posix_fadvise madvise) if test "x$enable_mmap" = xyes; then