1 |
polynomial-c 14/01/05 10:44:56 |
2 |
|
3 |
Added: dhcpcd-6.2.0-no_ipv6_fix.patch |
4 |
Log: |
5 |
Fixed building without ipv6 support (bug #497098) |
6 |
|
7 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 net-misc/dhcpcd/files/dhcpcd-6.2.0-no_ipv6_fix.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/dhcpcd/files/dhcpcd-6.2.0-no_ipv6_fix.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/dhcpcd/files/dhcpcd-6.2.0-no_ipv6_fix.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: dhcpcd-6.2.0-no_ipv6_fix.patch |
16 |
=================================================================== |
17 |
Index: dhcp-common.c |
18 |
================================================================== |
19 |
--- dhcp-common.c |
20 |
+++ dhcp-common.c |
21 |
@@ -349,14 +349,20 @@ |
22 |
else |
23 |
/* If we don't know the size, assume it's valid */ |
24 |
return dl; |
25 |
return (dl < sz ? 0 : sz); |
26 |
} |
27 |
+ |
28 |
+#ifdef INET6 |
29 |
+#define PO_IFNAME |
30 |
+#else |
31 |
+#define PO_IFNAME __unused |
32 |
+#endif |
33 |
|
34 |
ssize_t |
35 |
print_option(char *s, ssize_t len, int type, int dl, const uint8_t *data, |
36 |
- const char *ifname) |
37 |
+ PO_IFNAME const char *ifname) |
38 |
{ |
39 |
const uint8_t *e, *t; |
40 |
uint16_t u16; |
41 |
int16_t s16; |
42 |
uint32_t u32; |
43 |
|
44 |
Index: if-options.c |
45 |
================================================================== |
46 |
--- if-options.c |
47 |
+++ if-options.c |
48 |
@@ -1550,10 +1550,11 @@ |
49 |
char *buf; |
50 |
const char **e; |
51 |
size_t buflen, ol; |
52 |
#endif |
53 |
#if !defined(INET) || !defined(INET6) |
54 |
+ size_t i; |
55 |
struct dhcp_opt *opt; |
56 |
#endif |
57 |
|
58 |
/* Seed our default options */ |
59 |
ifo = calloc(1, sizeof(*ifo)); |
60 |
@@ -1667,11 +1668,11 @@ |
61 |
#ifdef INET6 |
62 |
dhcp6_opts = ifo->dhcp6_override; |
63 |
dhcp6_opts_len = ifo->dhcp6_override_len; |
64 |
#else |
65 |
for (i = 0, opt = ifo->dhcp6_override; |
66 |
- i < ifo->dhcp_override6_len; |
67 |
+ i < ifo->dhcp6_override_len; |
68 |
i++, opt++) |
69 |
free_dhcp_opt_embenc(opt); |
70 |
free(ifo->dhcp6_override); |
71 |
#endif |
72 |
ifo->dhcp6_override = NULL; |