summaryrefslogtreecommitdiff
path: root/package/ndisc6/patches/patch-src_ndisc_c
blob: af3abf1d3596b922151ef1340b4a6f42b1b11088 (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
$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
--- ndisc6-0.9.8.orig/src/ndisc.c	2008-05-01 14:52:28.000000000 +0200
+++ ndisc6-0.9.8/src/ndisc.c	2009-05-10 19:16:53.000000000 +0200
@@ -375,12 +375,13 @@ parseroute (const uint8_t *opt)
 static int
 parserdnss (const uint8_t *opt)
 {
+	unsigned int i;
 	uint8_t optlen = opt[1];
 	if (((optlen & 1) == 0) || (optlen < 3))
 		return -1;
 
 	optlen /= 2;
-	for (unsigned i = 0; i < optlen; i++)
+	for (i = 0; i < optlen; i++)
 	{
 		char str[INET6_ADDRSTRLEN];
 
@@ -521,6 +522,7 @@ static ssize_t
 recvfromLL (int fd, void *buf, size_t len, int flags,
             struct sockaddr_in6 *addr)
 {
+	struct cmsghdr *cmsg;
 	char cbuf[CMSG_SPACE (sizeof (int))];
 	struct iovec iov =
 	{
@@ -542,7 +544,7 @@ recvfromLL (int fd, void *buf, size_t le
 		return val;
 
 	/* ensures the hop limit is 255 */
-	for (struct cmsghdr *cmsg = CMSG_FIRSTHDR (&hdr);
+	for (cmsg = CMSG_FIRSTHDR (&hdr);
 	     cmsg != NULL;
 	     cmsg = CMSG_NXTHDR (&hdr, cmsg))
 	{