configure: Fix detection of fallocate on old glibc.
Hans Leidekker
hans at codeweavers.com
Fri Dec 7 02:22:40 CST 2012
Fixes http://bugs.winehq.org/show_bug.cgi?id=32369
---
configure.ac | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 4c7655a..01d84cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
--
1.7.10.4
More information about the wine-patches
mailing list