summaryrefslogtreecommitdiffstats
path: root/package/mrouted/mrouted-3.9-beta3-bcopy_bcmp_bzero.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/mrouted/mrouted-3.9-beta3-bcopy_bcmp_bzero.patch')
-rw-r--r--package/mrouted/mrouted-3.9-beta3-bcopy_bcmp_bzero.patch164
1 files changed, 164 insertions, 0 deletions
diff --git a/package/mrouted/mrouted-3.9-beta3-bcopy_bcmp_bzero.patch b/package/mrouted/mrouted-3.9-beta3-bcopy_bcmp_bzero.patch
new file mode 100644
index 000000000..e38efd2e3
--- /dev/null
+++ b/package/mrouted/mrouted-3.9-beta3-bcopy_bcmp_bzero.patch
@@ -0,0 +1,164 @@
+diff -urN mrouted-3.9-beta3.0rig/cfparse.y mrouted-3.9-beta3/cfparse.y
+--- mrouted-3.9-beta3.0rig/cfparse.y 1998-03-01 02:48:58.000000000 +0100
++++ mrouted-3.9-beta3/cfparse.y 2009-01-14 21:17:00.000000000 +0100
+@@ -583,8 +583,7 @@
+ if (hp->h_addr_list[1])
+ fatal("Hostname %s does not %s",
+ $1, "map to a unique address");
+-
+- bcopy(hp->h_addr_list[0], &$$,
++ memmove (&$$, hp->h_addr_list[0],
+ hp->h_length);
+ }
+
+diff -urN mrouted-3.9-beta3.0rig/config.c mrouted-3.9-beta3/config.c
+--- mrouted-3.9-beta3.0rig/config.c 1998-01-06 02:57:41.000000000 +0100
++++ mrouted-3.9-beta3/config.c 2009-01-14 21:18:59.000000000 +0100
+@@ -89,7 +89,7 @@
+ * SIOCGIFFLAGS stomps over it because the requests
+ * are returned in a union.)
+ */
+- bcopy(ifrp->ifr_name, ifr.ifr_name, sizeof(ifr.ifr_name));
++ memmove (ifr.ifr_name, ifrp->ifr_name, sizeof(ifr.ifr_name));
+
+ /*
+ * Ignore loopback interfaces and interfaces that do not support
+diff -urN mrouted-3.9-beta3.0rig/defs.h mrouted-3.9-beta3/defs.h
+--- mrouted-3.9-beta3.0rig/defs.h 2009-01-14 21:12:22.000000000 +0100
++++ mrouted-3.9-beta3/defs.h 2009-01-14 21:20:05.000000000 +0100
+@@ -116,8 +116,6 @@
+ #endif /* RSRR */
+
+ #ifdef SYSV
+-#define bcopy(a, b, c) memcpy(b, a, c)
+-#define bzero(s, n) memset((s), 0, (n))
+ #define setlinebuf(s) setvbuf(s, NULL, _IOLBF, 0)
+ #endif
+
+diff -urN mrouted-3.9-beta3.0rig/igmp.c mrouted-3.9-beta3/igmp.c
+--- mrouted-3.9-beta3.0rig/igmp.c 1998-01-06 02:57:43.000000000 +0100
++++ mrouted-3.9-beta3/igmp.c 2009-01-14 21:27:41.000000000 +0100
+@@ -56,7 +56,7 @@
+ k_set_loop(FALSE); /* disable multicast loopback */
+
+ ip = (struct ip *)send_buf;
+- bzero(ip, sizeof(struct ip));
++ memset(ip, 0, sizeof(struct ip));
+ /*
+ * Fields zeroed that aren't filled in later:
+ * - IP ID (let the kernel fill it in)
+@@ -421,7 +421,7 @@
+ }
+ }
+
+- bzero(&sdst, sizeof(sdst));
++ memset(&sdst, 0, sizeof(sdst));
+ sdst.sin_family = AF_INET;
+ #ifdef HAVE_SA_LEN
+ sdst.sin_len = sizeof(sdst);
+diff -urN mrouted-3.9-beta3.0rig/ipip.c mrouted-3.9-beta3/ipip.c
+--- mrouted-3.9-beta3.0rig/ipip.c 1998-01-06 02:57:45.000000000 +0100
++++ mrouted-3.9-beta3/ipip.c 2009-01-14 21:28:19.000000000 +0100
+@@ -61,7 +61,7 @@
+ ip = v->uv_encap_hdr = (struct ip *)malloc(sizeof(struct ip));
+ if (ip == NULL)
+ log(LOG_ERR, 0, "out of memory");
+- bzero(ip, sizeof(struct ip));
++ memset(ip, 0, sizeof(struct ip));
+ /*
+ * Fields zeroed that aren't filled in later:
+ * - IP ID (let the kernel fill it in)
+@@ -111,7 +111,7 @@
+ ip->ip_len = htons(ip->ip_len);
+ #endif
+
+- bzero(&sdst, sizeof(sdst));
++ memset(&sdst, 0, sizeof(sdst));
+ sdst.sin_family = AF_INET;
+ #ifdef HAVE_SA_LEN
+ sdst.sin_len = sizeof(sdst);
+@@ -123,7 +123,7 @@
+ iov[1].iov_base = (caddr_t)send_buf;
+ iov[1].iov_len = MIN_IP_HEADER_LEN + IGMP_MINLEN + datalen;
+
+- bzero(&msg, sizeof(msg));
++ memset(&msg, 0, sizeof(msg));
+ msg.msg_name = (caddr_t)&sdst;
+ msg.msg_namelen = sizeof(sdst);
+ msg.msg_iov = iov;
+diff -urN mrouted-3.9-beta3.0rig/main.c mrouted-3.9-beta3/main.c
+--- mrouted-3.9-beta3.0rig/main.c 2009-01-14 21:12:22.000000000 +0100
++++ mrouted-3.9-beta3/main.c 2009-01-14 21:22:33.000000000 +0100
+@@ -429,7 +429,7 @@
+ gettimeofday(&curtime, NULL);
+ lasttime = curtime;
+ for(;;) {
+- bcopy((char *)&readers, (char *)&rfds, sizeof(rfds));
++ memmove ((char *)&rfds, (char *)&readers, sizeof(rfds));
+ secs = timer_nextTimer();
+ if (secs == -1)
+ timeout = NULL;
+diff -urN mrouted-3.9-beta3.0rig/prune.c mrouted-3.9-beta3/prune.c
+--- mrouted-3.9-beta3.0rig/prune.c 1998-03-01 03:06:32.000000000 +0100
++++ mrouted-3.9-beta3/prune.c 2009-01-14 21:27:06.000000000 +0100
+@@ -2450,7 +2450,7 @@
+ /* copy the packet to the sending buffer */
+ p = send_buf + MIN_IP_HEADER_LEN + IGMP_MINLEN;
+
+- bcopy(data, p, datalen);
++ memmove (p, data, datalen);
+
+ p += datalen;
+
+@@ -2469,7 +2469,7 @@
+ * fill in initial response fields
+ */
+ resp = (struct tr_resp *)p;
+- bzero(resp, sizeof(struct tr_resp));
++ memset(resp, 0, sizeof(struct tr_resp));
+ datalen += RLEN;
+
+ resp->tr_qarr = htonl(((tp.tv_sec + JAN_1970) << 16) +
+diff -urN mrouted-3.9-beta3.0rig/route.c mrouted-3.9-beta3/route.c
+--- mrouted-3.9-beta3.0rig/route.c 1998-01-15 01:08:34.000000000 +0100
++++ mrouted-3.9-beta3/route.c 2009-01-14 21:26:37.000000000 +0100
+@@ -388,7 +388,8 @@
+ else r->rt_originwidth = 1;
+ r->rt_flags = 0;
+ r->rt_dominants = (u_int32 *)(r + 1);
+- bzero(r->rt_dominants, numvifs * sizeof(u_int32));
++ memset(r->rt_dominants, 0, numvifs * sizeof(u_int32));
++
+ r->rt_groups = NULL;
+ VIFM_CLRALL(r->rt_children);
+ NBRM_CLRALL(r->rt_subordinates);
+@@ -968,7 +969,7 @@
+ bh->bh_dst = dst;
+ bh->bh_level = level;
+ bh->bh_datalen = datalen;
+- bcopy(p, (char *)(bh + 1), datalen);
++ memmove ((char *)(bh + 1), p, datalen);
+ v->uv_blasterend += bblen;
+
+ if (v->uv_blastertimer == 0) {
+diff -urN mrouted-3.9-beta3.0rig/rsrr.c mrouted-3.9-beta3/rsrr.c
+--- mrouted-3.9-beta3.0rig/rsrr.c 1998-01-06 02:57:58.000000000 +0100
++++ mrouted-3.9-beta3/rsrr.c 2009-01-14 21:29:18.000000000 +0100
+@@ -81,7 +81,7 @@
+ log(LOG_ERR, errno, "Can't create RSRR socket");
+
+ unlink(RSRR_SERV_PATH);
+- bzero((char *) &serv_addr, sizeof(serv_addr));
++ memset((char *) &serv_addr, 0, sizeof(serv_addr));
+ serv_addr.sun_family = AF_UNIX;
+ strcpy(serv_addr.sun_path, RSRR_SERV_PATH);
+ #ifdef HAVE_SA_LEN
+@@ -107,7 +107,7 @@
+ {
+ register int rsrr_recvlen;
+
+- bzero((char *) &client_addr, sizeof(client_addr));
++ memset((char *) &client_addr, 0, sizeof(client_addr));
+ rsrr_recvlen = recvfrom(rsrr_socket, rsrr_recv_buf, sizeof(rsrr_recv_buf),
+ 0, (struct sockaddr *)&client_addr, &client_length);
+ if (rsrr_recvlen < 0) {