Commit 3244be05 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

configure: Fix detection of fallocate on old glibc.

parent 8818e259
......@@ -12931,7 +12931,6 @@ for ac_func in \
chsize \
dlopen \
epoll_create \
fallocate \
ffs \
finite \
fnmatch \
......@@ -13494,6 +13493,40 @@ $as_echo "#define HAVE_SCHED_SETAFFINITY 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fallocate" >&5
$as_echo_n "checking for fallocate... " >&6; }
if ${wine_cv_have_fallocate+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define _GNU_SOURCE
#include <fcntl.h>
int
main ()
{
fallocate(-1, 0, 0, 0);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
wine_cv_have_fallocate=yes
else
wine_cv_have_fallocate=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wine_cv_have_fallocate" >&5
$as_echo "$wine_cv_have_fallocate" >&6; }
if test "$wine_cv_have_fallocate" = "yes"
then
$as_echo "#define HAVE_FALLOCATE 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
$as_echo_n "checking for inline... " >&6; }
......
......@@ -1976,7 +1976,6 @@ AC_CHECK_FUNCS(\
chsize \
dlopen \
epoll_create \
fallocate \
ffs \
finite \
fnmatch \
......@@ -2117,6 +2116,15 @@ then
AC_DEFINE(HAVE_SCHED_SETAFFINITY, 1, [Define to 1 if you have the `sched_setaffinity' function.])
fi
AC_CACHE_CHECK([for fallocate],wine_cv_have_fallocate,
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[#define _GNU_SOURCE
#include <fcntl.h>]], [[fallocate(-1, 0, 0, 0);]])],[wine_cv_have_fallocate=yes],[wine_cv_have_fallocate=no]))
if test "$wine_cv_have_fallocate" = "yes"
then
AC_DEFINE(HAVE_FALLOCATE, 1, [Define to 1 if you have the `fallocate' function.])
fi
dnl **** Check for types ****
AC_C_INLINE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment