blob: f86235076efdea3ec60c80ad4b0fd31b0aa0ea09 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001From 07150f3a27681e034f18ab2ed2b68914c1e10af6 Mon Sep 17 00:00:00 2001
2From: Li xin <lixin.fnst@cn.fujitsu.com>
3Date: Sat, 18 Jul 2015 05:03:57 +0900
4Subject: [PATCH] configure.ac: convert AC_TRY_RUN to AC_TRY_LINK statements
5
6This is not completely safe, but it's the least invasive fix.
7
8Upstream-Status: pending
9
10Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
11Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
12---
13 configure.ac | 15 +++++----------
14 1 file changed, 5 insertions(+), 10 deletions(-)
15
16diff --git a/configure.ac b/configure.ac
17index 3b32614..94ec002 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -519,13 +519,10 @@ have_ioloop=no
21
22 if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then
23 AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[
24- AC_TRY_RUN([
25+ AC_TRY_LINK([
26 #include <sys/epoll.h>
27-
28- int main()
29- {
30- return epoll_create(5) < 1;
31- }
32+ ], [
33+ epoll_create(5) < 1;
34 ], [
35 i_cv_epoll_works=yes
36 ], [
37@@ -653,7 +650,7 @@ fi
38 dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it.
39 dnl * It may also be broken in AIX.
40 AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
41- AC_TRY_RUN([
42+ AC_TRY_LINK([
43 #define _XOPEN_SOURCE 600
44 #include <stdio.h>
45 #include <stdlib.h>
46@@ -662,7 +659,7 @@ AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
47 #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7)
48 possibly broken posix_fallocate
49 #endif
50- int main() {
51+ ], [
52 int fd = creat("conftest.temp", 0600);
53 int ret;
54 if (fd == -1) {
55@@ -671,8 +668,6 @@ AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
56 }
57 ret = posix_fallocate(fd, 1024, 1024) < 0 ? 1 : 0;
58 unlink("conftest.temp");
59- return ret;
60- }
61 ], [
62 i_cv_posix_fallocate_works=yes
63 ], [
64--
651.8.4.2
66