diff options
Diffstat (limited to 'meta')
3 files changed, 110 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/libpcap/libpcap/0001-Fix-compiler_state_t.ai-usage-when-INET6-is-not-defi.patch b/meta/recipes-connectivity/libpcap/libpcap/0001-Fix-compiler_state_t.ai-usage-when-INET6-is-not-defi.patch new file mode 100644 index 0000000000..edb6ae5667 --- /dev/null +++ b/meta/recipes-connectivity/libpcap/libpcap/0001-Fix-compiler_state_t.ai-usage-when-INET6-is-not-defi.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 64aa033a061c43fc15c711f2490ae41d23b868c3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Fabio Berton <fabio.berton@ossystems.com.br> | ||
3 | Date: Thu, 17 Nov 2016 09:44:42 -0200 | ||
4 | Subject: [PATCH 1/2] Fix compiler_state_t.ai usage when INET6 is not defined | ||
5 | Organization: O.S. Systems Software LTDA. | ||
6 | |||
7 | Fix error: | ||
8 | |||
9 | / | ||
10 | | ../libpcap-1.8.1/gencode.c: In function 'pcap_compile': | ||
11 | | ../libpcap-1.8.1/gencode.c:693:8: error: 'compiler_state_t | ||
12 | | {aka struct _compiler_state}' has no member named 'ai' | ||
13 | | cstate.ai = NULL; | ||
14 | \ | ||
15 | |||
16 | Upstream-Status: Submitted [1] | ||
17 | |||
18 | [1] https://github.com/the-tcpdump-group/libpcap/pull/541 | ||
19 | |||
20 | Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> | ||
21 | --- | ||
22 | gencode.c | 2 ++ | ||
23 | 1 file changed, 2 insertions(+) | ||
24 | |||
25 | diff --git a/gencode.c b/gencode.c | ||
26 | index a887f27..e103c70 100644 | ||
27 | --- a/gencode.c | ||
28 | +++ b/gencode.c | ||
29 | @@ -690,7 +690,9 @@ pcap_compile(pcap_t *p, struct bpf_program *program, | ||
30 | } | ||
31 | initchunks(&cstate); | ||
32 | cstate.no_optimize = 0; | ||
33 | +#ifdef INET6 | ||
34 | cstate.ai = NULL; | ||
35 | +#endif | ||
36 | cstate.ic.root = NULL; | ||
37 | cstate.ic.cur_mark = 0; | ||
38 | cstate.bpf_pcap = p; | ||
39 | -- | ||
40 | 2.1.4 | ||
41 | |||
diff --git a/meta/recipes-connectivity/libpcap/libpcap/0002-Add-missing-compiler_state_t-parameter.patch b/meta/recipes-connectivity/libpcap/libpcap/0002-Add-missing-compiler_state_t-parameter.patch new file mode 100644 index 0000000000..032b265f05 --- /dev/null +++ b/meta/recipes-connectivity/libpcap/libpcap/0002-Add-missing-compiler_state_t-parameter.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | From 50ec0a088d5924a8305b2d70dcba71b0942dee1a Mon Sep 17 00:00:00 2001 | ||
2 | From: Fabio Berton <fabio.berton@ossystems.com.br> | ||
3 | Date: Thu, 17 Nov 2016 09:47:29 -0200 | ||
4 | Subject: [PATCH 2/2] Add missing compiler_state_t parameter | ||
5 | Organization: O.S. Systems Software LTDA. | ||
6 | |||
7 | Fix error: | ||
8 | |||
9 | / | ||
10 | |../libpcap-1.8.1/gencode.c: In function 'gen_gateway': | ||
11 | |../libpcap-1.8.1/gencode.c:4914:13: error: 'cstate' undeclared | ||
12 | | (first use in this function) | ||
13 | | bpf_error(cstate, "direction applied to 'gateway'"); | ||
14 | \ | ||
15 | |||
16 | Upstream-Status: Submitted [1] | ||
17 | |||
18 | [1] https://github.com/the-tcpdump-group/libpcap/pull/541 | ||
19 | |||
20 | Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> | ||
21 | --- | ||
22 | gencode.c | 15 ++++++++------- | ||
23 | 1 file changed, 8 insertions(+), 7 deletions(-) | ||
24 | |||
25 | diff --git a/gencode.c b/gencode.c | ||
26 | index e103c70..f07c0be 100644 | ||
27 | --- a/gencode.c | ||
28 | +++ b/gencode.c | ||
29 | @@ -523,7 +523,7 @@ static struct block *gen_host6(compiler_state_t *, struct in6_addr *, | ||
30 | struct in6_addr *, int, int, int); | ||
31 | #endif | ||
32 | #ifndef INET6 | ||
33 | -static struct block *gen_gateway(const u_char *, bpf_u_int32 **, int, int); | ||
34 | +static struct block *gen_gateway(compiler_state_t *, const u_char *, bpf_u_int32 **, int, int); | ||
35 | #endif | ||
36 | static struct block *gen_ipfrag(compiler_state_t *); | ||
37 | static struct block *gen_portatom(compiler_state_t *, int, bpf_int32); | ||
38 | @@ -4904,11 +4904,12 @@ gen_host6(compiler_state_t *cstate, struct in6_addr *addr, | ||
39 | |||
40 | #ifndef INET6 | ||
41 | static struct block * | ||
42 | -gen_gateway(eaddr, alist, proto, dir) | ||
43 | - const u_char *eaddr; | ||
44 | - bpf_u_int32 **alist; | ||
45 | - int proto; | ||
46 | - int dir; | ||
47 | +gen_gateway(cstate, eaddr, alist, proto, dir) | ||
48 | + compiler_state_t *cstate; | ||
49 | + const u_char *eaddr; | ||
50 | + bpf_u_int32 **alist; | ||
51 | + int proto; | ||
52 | + int dir; | ||
53 | { | ||
54 | struct block *b0, *b1, *tmp; | ||
55 | |||
56 | @@ -6472,7 +6473,7 @@ gen_scode(compiler_state_t *cstate, const char *name, struct qual q) | ||
57 | alist = pcap_nametoaddr(name); | ||
58 | if (alist == NULL || *alist == NULL) | ||
59 | bpf_error(cstate, "unknown host '%s'", name); | ||
60 | - b = gen_gateway(eaddr, alist, proto, dir); | ||
61 | + b = gen_gateway(cstate, eaddr, alist, proto, dir); | ||
62 | free(eaddr); | ||
63 | return b; | ||
64 | #else | ||
65 | -- | ||
66 | 2.1.4 | ||
67 | |||
diff --git a/meta/recipes-connectivity/libpcap/libpcap_1.8.1.bb b/meta/recipes-connectivity/libpcap/libpcap_1.8.1.bb index 9072fe0b7d..e9db28a7d7 100644 --- a/meta/recipes-connectivity/libpcap/libpcap_1.8.1.bb +++ b/meta/recipes-connectivity/libpcap/libpcap_1.8.1.bb | |||
@@ -2,6 +2,8 @@ require libpcap.inc | |||
2 | 2 | ||
3 | SRC_URI += " \ | 3 | SRC_URI += " \ |
4 | file://libpcap-pkgconfig-support.patch \ | 4 | file://libpcap-pkgconfig-support.patch \ |
5 | file://0001-Fix-compiler_state_t.ai-usage-when-INET6-is-not-defi.patch \ | ||
6 | file://0002-Add-missing-compiler_state_t-parameter.patch \ | ||
5 | " | 7 | " |
6 | 8 | ||
7 | SRC_URI[md5sum] = "3d48f9cd171ff12b0efd9134b52f1447" | 9 | SRC_URI[md5sum] = "3d48f9cd171ff12b0efd9134b52f1447" |