summaryrefslogtreecommitdiff
path: root/package/udp-broadcast-relay/patches/patch-main_c
blob: f57fb04090ea3d651f1d58efc8017bfaddc2ab14 (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
$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
--- udp-broadcast-relay-0.3.orig/main.c	2003-09-28 16:43:32.000000000 +0200
+++ udp-broadcast-relay-0.3/main.c	2008-10-15 16:04:02.000000000 +0200
@@ -220,8 +220,8 @@ main(int argc,char **argv)
     		}
 
 		/* Save the address for later use */
-		bcopy(	(struct sockaddr_in *)&reqbuf.ifr_addr,
-			&ifs[maxifs].dstaddr,
+		memcpy(	&ifs[maxifs].dstaddr,
+			(struct sockaddr_in *)&reqbuf.ifr_addr,
 			sizeof(struct sockaddr_in) );
 
 		DPRINT("%s: %i / %s\n",
@@ -349,7 +349,7 @@ main(int argc,char **argv)
 		DPRINT("From:\t\t%s:%d\n",inet_ntoa(rcv_addr.sin_addr),rcv_addr.sin_port);
 	
 		/* copy sender's details into our datagram as the source addr */	
-		bcopy(&(rcv_addr.sin_addr.s_addr),(gram+12),4);
+		memcpy((gram+12),&(rcv_addr.sin_addr.s_addr),4);
 	  	*(u_short*)(gram+20)=(u_short)rcv_addr.sin_port;
 
 		/* set the length of the packet */
@@ -362,7 +362,7 @@ main(int argc,char **argv)
 			if (ifs[x].ifindex == rcv_ifindex) continue; /* no bounces, please */
 
 			/* Set destination addr ip - port is set already*/
-			bcopy(&(ifs[x].dstaddr.sin_addr.s_addr),(gram+16),4);	
+			memcpy((gram+16),&(ifs[x].dstaddr.sin_addr.s_addr),4);	
 
 			DPRINT ("Sent to %s:%d on interface %i\n",
 				inet_ntoa(ifs[x].dstaddr.sin_addr), /* dst ip */