summaryrefslogtreecommitdiff
path: root/package/ndisc/patches/patch-rdnssd_icmp_c
blob: 78cbd8e438664151af734dc5aae80d8b35728018 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
--- ndisc6-0.9.8.orig/rdnssd/icmp.c	2008-05-01 14:52:28.000000000 +0200
+++ ndisc6-0.9.8/rdnssd/icmp.c	2009-05-10 19:43:19.000000000 +0200
@@ -47,6 +47,7 @@
 
 static int icmp_recv (int fd)
 {
+		struct cmsghdr *cmsg;
 		struct nd_router_advert icmp6;
 		uint8_t buf[65536 - sizeof (icmp6)], cbuf[CMSG_SPACE (sizeof (int))];
 		struct iovec iov[2] =
@@ -74,7 +75,7 @@ static int icmp_recv (int fd)
 		 || (icmp6.nd_ra_code != 0)) /* unknown ICMPv6 code */
 			return -1;
 
-		for (struct cmsghdr *cmsg = CMSG_FIRSTHDR (&msg);
+		for (cmsg = CMSG_FIRSTHDR (&msg);
 		     cmsg != NULL;
 		     cmsg = CMSG_NXTHDR (&msg, cmsg))
 		{