diff options
author | wbx <wbx@hydrogenium.(none)> | 2009-05-17 14:41:34 +0200 |
---|---|---|
committer | wbx <wbx@hydrogenium.(none)> | 2009-05-17 14:41:34 +0200 |
commit | 219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch) | |
tree | b9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/udp-broadcast-relay/patches/patch-main_c |
Initial import
Diffstat (limited to 'package/udp-broadcast-relay/patches/patch-main_c')
-rw-r--r-- | package/udp-broadcast-relay/patches/patch-main_c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/package/udp-broadcast-relay/patches/patch-main_c b/package/udp-broadcast-relay/patches/patch-main_c new file mode 100644 index 000000000..f57fb0409 --- /dev/null +++ b/package/udp-broadcast-relay/patches/patch-main_c @@ -0,0 +1,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 */ |