summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-networking/recipes-support/dovecot/dovecot/0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch
blob: f86235076efdea3ec60c80ad4b0fd31b0aa0ea09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From 07150f3a27681e034f18ab2ed2b68914c1e10af6 Mon Sep 17 00:00:00 2001
From: Li xin <lixin.fnst@cn.fujitsu.com>
Date: Sat, 18 Jul 2015 05:03:57 +0900
Subject: [PATCH] configure.ac: convert AC_TRY_RUN to AC_TRY_LINK statements

This is not completely safe, but it's the least invasive fix.

Upstream-Status: pending

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
---
 configure.ac | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3b32614..94ec002 100644
--- a/configure.ac
+++ b/configure.ac
@@ -519,13 +519,10 @@ have_ioloop=no
 
 if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then
   AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[
-    AC_TRY_RUN([
+    AC_TRY_LINK([
       #include <sys/epoll.h>
-  
-      int main()
-      {
-	return epoll_create(5) < 1;
-      }
+    ], [
+      epoll_create(5) < 1;
     ], [
       i_cv_epoll_works=yes
     ], [
@@ -653,7 +650,7 @@ fi
 dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it.
 dnl * It may also be broken in AIX.
 AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
-  AC_TRY_RUN([
+  AC_TRY_LINK([
     #define _XOPEN_SOURCE 600
     #include <stdio.h>
     #include <stdlib.h>
@@ -662,7 +659,7 @@ AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
     #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7)
       possibly broken posix_fallocate
     #endif
-    int main() {
+    ], [
       int fd = creat("conftest.temp", 0600);
       int ret;
       if (fd == -1) {
@@ -671,8 +668,6 @@ AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
       }
       ret = posix_fallocate(fd, 1024, 1024) < 0 ? 1 : 0;
       unlink("conftest.temp");
-      return ret;
-    }
   ], [
     i_cv_posix_fallocate_works=yes
   ], [
-- 
1.8.4.2

OpenPOWER on IntegriCloud