diff options
Diffstat (limited to 'meta/recipes-connectivity/libpcap/libpcap/0002-Add-missing-compiler_state_t-parameter.patch')
-rw-r--r-- | meta/recipes-connectivity/libpcap/libpcap/0002-Add-missing-compiler_state_t-parameter.patch | 67 |
1 files changed, 67 insertions, 0 deletions
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 | |||