diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 4b495371d4..7ec11478f5 100644 --- a/configure.ac +++ b/configure.ac @@ -1108,6 +1108,15 @@ main() ]) ]) AC_CHECK_TYPES([caddr_t],[],[],[@%:@include <sys/types.h>]) + RUBY_WERROR_FLAG([AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + @%:@if defined(HAVE_CADDR_T) && (defined(MADV_FREE) || defined(MADV_DONTNEED)) + @%:@include <sys/unistd.h> + @%:@include <sys/mman.h> + @%:@include <sys/types.h> + extern int madvise(caddr_t, size_t, int); + ]], [[]])], + [AC_DEFINE(NEED_MADVICE_PROTOTYPE_USING_CADDR_T, 1)], []) + ]) ], [haiku*], [ LIBS="$LIBS" # m lib is include in root |