aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity/rtorrent/rtorrent/don-t-run-code-while-configuring-package.patch
blob: 7d09f4382f63e50a8293919425161821b4b3b42f (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
Using AC_RUN_IFELSE prevent people from configuring package
 for cross-compiling. Don't run code while configuring package.

Upstream-Status: Pending
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>

Update for 0.9.8.
Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
---
 scripts/checks.m4 | 34 ----------------------------------
 scripts/common.m4 | 28 ----------------------------
 2 files changed, 62 deletions(-)

diff --git a/scripts/checks.m4 b/scripts/checks.m4
index 83be846..1af80f5 100644
--- a/scripts/checks.m4
+++ b/scripts/checks.m4
@@ -95,40 +95,6 @@ AC_DEFUN([TORRENT_CHECK_KQUEUE], [
 
 AC_DEFUN([TORRENT_CHECK_KQUEUE_SOCKET_ONLY], [
   AC_MSG_CHECKING(whether kqueue supports pipes and ptys)
-
-  AC_LINK_IFELSE([AC_LANG_SOURCE([
-      #include <fcntl.h>
-      #include <stdlib.h>
-      #include <unistd.h>
-      #include <sys/event.h>
-      #include <sys/time.h>
-      int main() {
-        struct kevent ev@<:@2@:>@, ev_out@<:@2@:>@;
-        struct timespec ts = { 0, 0 };
-        int pfd@<:@2@:>@, pty@<:@2@:>@, kfd, n;
-        char buffer@<:@9001@:>@;
-        if (pipe(pfd) == -1) return 1;
-        if (fcntl(pfd@<:@1@:>@, F_SETFL, O_NONBLOCK) == -1) return 2;
-        while ((n = write(pfd@<:@1@:>@, buffer, sizeof(buffer))) == sizeof(buffer));
-        if ((pty@<:@0@:>@=posix_openpt(O_RDWR | O_NOCTTY)) == -1) return 3;
-        if ((pty@<:@1@:>@=grantpt(pty@<:@0@:>@)) == -1) return 4;
-        EV_SET(ev+0, pfd@<:@1@:>@, EVFILT_WRITE, EV_ADD | EV_ENABLE, 0, 0, NULL);
-        EV_SET(ev+1, pty@<:@1@:>@, EVFILT_READ, EV_ADD | EV_ENABLE, 0, 0, NULL);
-        if ((kfd = kqueue()) == -1) return 5;
-        if ((n = kevent(kfd, ev, 2, NULL, 0, NULL)) == -1) return 6;
-        if (ev_out@<:@0@:>@.flags & EV_ERROR) return 7;
-        if (ev_out@<:@1@:>@.flags & EV_ERROR) return 8;
-        read(pfd@<:@0@:>@, buffer, sizeof(buffer));
-        if ((n = kevent(kfd, NULL, 0, ev_out, 2, &ts)) < 1) return 9;
-        return 0;
-      }
-      ])],
-    [
-      AC_MSG_RESULT(yes)
-    ], [
-      AC_DEFINE(KQUEUE_SOCKET_ONLY, 1, kqueue only supports sockets.)
-      AC_MSG_RESULT(no)
-    ])
 ])
 
 AC_DEFUN([TORRENT_WITH_KQUEUE], [
diff --git a/scripts/common.m4 b/scripts/common.m4
index aaf005e..42fb016 100644
--- a/scripts/common.m4
+++ b/scripts/common.m4
@@ -152,38 +152,10 @@ dnl   Need to fix this so that it uses the stuff defined by the system.
 
 AC_DEFUN([TORRENT_CHECK_EXECINFO], [
   AC_MSG_CHECKING(for execinfo.h)
-
-  AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-      #include <execinfo.h>
-      int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;}
-      ])],
-    [
-      AC_MSG_RESULT(yes)
-      AC_DEFINE(USE_EXECINFO, 1, Use execinfo.h)
-    ], [
-      AC_MSG_RESULT(no)
-  ])
 ])
 
 AC_DEFUN([TORRENT_CHECK_ALIGNED], [
   AC_MSG_CHECKING(the byte alignment)
-
-  AC_LINK_IFELSE([AC_LANG_SOURCE([
-      #include <inttypes.h>
-      int main() {
-        char buf@<:@8@:>@ = { 0, 0, 0, 0, 1, 0, 0, 0 };
-	int i;
-        for (i = 1; i < 4; ++i)
-	  if (*(uint32_t*)(buf + i) == 0) return -1;
-	return 0;
-	}
-      ])],
-    [
-      AC_MSG_RESULT(none needed)
-    ], [
-      AC_DEFINE(USE_ALIGNED, 1, Require byte alignment)
-      AC_MSG_RESULT(required)
-  ])
 ])
 
 
-- 
2.7.4