summaryrefslogtreecommitdiff
path: root/net/xorp
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2008-09-30 15:03:11 +0000
committerjoerg <joerg@pkgsrc.org>2008-09-30 15:03:11 +0000
commit4b58a20d5a189999bcf7bcd39e16af950b012a6f (patch)
treef644d90a52b40a318f10b7d4e4af60b4598b00ea /net/xorp
parent9345f84b804907ff2313a953f49a6047ccdfcbbf (diff)
downloadpkgsrc-4b58a20d5a189999bcf7bcd39e16af950b012a6f.tar.gz
Fix build on NetBSD current.
Diffstat (limited to 'net/xorp')
-rw-r--r--net/xorp/distinfo5
-rw-r--r--net/xorp/patches/patch-aa30
-rw-r--r--net/xorp/patches/patch-ab18
-rw-r--r--net/xorp/patches/patch-ac39
4 files changed, 91 insertions, 1 deletions
diff --git a/net/xorp/distinfo b/net/xorp/distinfo
index 08f08c9f7af..415d3d66356 100644
--- a/net/xorp/distinfo
+++ b/net/xorp/distinfo
@@ -1,5 +1,8 @@
-$NetBSD: distinfo,v 1.11 2008/09/11 10:59:03 obache Exp $
+$NetBSD: distinfo,v 1.12 2008/09/30 15:03:11 joerg Exp $
SHA1 (xorp-1.5.tar.gz) = cc6a0ec42d5dd49b57b9dab365a247c646d5e843
RMD160 (xorp-1.5.tar.gz) = 4dd5cc7162a0f8087ed973b45279718ea2a337b8
Size (xorp-1.5.tar.gz) = 7384564 bytes
+SHA1 (patch-aa) = d176aa03493496dfd1742ed8164f83aa1f74047b
+SHA1 (patch-ab) = 48a7e3579e1fa2bdd051b61420fa32bc6512c140
+SHA1 (patch-ac) = c30d04960b6f58792365462e0ad1daed7986c9ab
diff --git a/net/xorp/patches/patch-aa b/net/xorp/patches/patch-aa
new file mode 100644
index 00000000000..f3080599e65
--- /dev/null
+++ b/net/xorp/patches/patch-aa
@@ -0,0 +1,30 @@
+$NetBSD: patch-aa,v 1.5 2008/09/30 15:03:11 joerg Exp $
+
+--- libxipc/sockutil.cc.orig 2008-09-30 15:19:41.000000000 +0200
++++ libxipc/sockutil.cc
+@@ -299,13 +299,13 @@ get_active_ipv4_addrs(vector<IPv4>& addr
+ for ( ; ; ) {
+ ifconf.ifc_len = ifnum * sizeof(struct ifreq);
+ if (ifconf.ifc_buf != NULL)
+- delete[] ifconf.ifc_buf;
+- ifconf.ifc_buf = new char[ifconf.ifc_len];
++ free(ifconf.ifc_buf);
++ ifconf.ifc_buf = malloc(ifconf.ifc_len);
+ if (ioctl(s, SIOCGIFCONF, &ifconf) < 0) {
+ // Check UNPv1, 2e, pp 435 for an explanation why we need this
+ if ((errno != EINVAL) || (lastlen != 0)) {
+ XLOG_ERROR("ioctl(SIOCGIFCONF) failed: %s", strerror(errno));
+- delete[] ifconf.ifc_buf;
++ free(ifconf.ifc_buf);
+ comm_close(s);
+ return;
+ }
+@@ -322,7 +322,7 @@ get_active_ipv4_addrs(vector<IPv4>& addr
+ //
+ vector<uint8_t> buffer(ifconf.ifc_len);
+ memcpy(&buffer[0], ifconf.ifc_buf, ifconf.ifc_len);
+- delete[] ifconf.ifc_buf;
++ free(ifconf.ifc_buf);
+
+ //
+ // Parse the interface information
diff --git a/net/xorp/patches/patch-ab b/net/xorp/patches/patch-ab
new file mode 100644
index 00000000000..607e130505d
--- /dev/null
+++ b/net/xorp/patches/patch-ab
@@ -0,0 +1,18 @@
+$NetBSD: patch-ab,v 1.5 2008/09/30 15:03:11 joerg Exp $
+
+--- fea/data_plane/control_socket/click_socket.cc.orig 2008-09-30 15:43:19.000000000 +0200
++++ fea/data_plane/control_socket/click_socket.cc
+@@ -732,8 +732,13 @@ ClickSocket::mount_click_file_system(str
+ ret_value = mount("none", _kernel_click_mount_directory.c_str(),
+ CLICK_FILE_SYSTEM_TYPE.c_str(), 0, 0);
+ #else // ! HOST_OS_LINUX
++# if defined(__NetBSD__) && defined(__NetBSD_Prereq__) && __NetBSD_Prereq__(4,99,24)
++ ret_value = mount(CLICK_FILE_SYSTEM_TYPE.c_str(),
++ _kernel_click_mount_directory.c_str(), 0, 0, 0);
++# else
+ ret_value = mount(CLICK_FILE_SYSTEM_TYPE.c_str(),
+ _kernel_click_mount_directory.c_str(), 0, 0);
++# endif
+ #endif // ! HOST_OS_LINUX
+
+ if (ret_value != 0) {
diff --git a/net/xorp/patches/patch-ac b/net/xorp/patches/patch-ac
new file mode 100644
index 00000000000..f5e10b83185
--- /dev/null
+++ b/net/xorp/patches/patch-ac
@@ -0,0 +1,39 @@
+$NetBSD: patch-ac,v 1.3 2008/09/30 15:03:11 joerg Exp $
+
+--- fea/data_plane/ifconfig/ifconfig_get_ioctl.cc.orig 2008-09-30 15:53:56.000000000 +0200
++++ fea/data_plane/ifconfig/ifconfig_get_ioctl.cc
+@@ -154,7 +154,7 @@ IfConfigGetIoctl::read_config(IfTree& if
+ return (XORP_ERROR);
+ vector<uint8_t> buffer(ifconf.ifc_len);
+ memcpy(&buffer[0], ifconf.ifc_buf, ifconf.ifc_len);
+- delete[] ifconf.ifc_buf;
++ free(ifconf.ifc_buf);
+
+ parse_buffer_ioctl(ifconfig(), iftree, AF_INET, buffer);
+ }
+@@ -168,7 +168,7 @@ IfConfigGetIoctl::read_config(IfTree& if
+ return (XORP_ERROR);
+ vector<uint8_t> buffer(ifconf.ifc_len);
+ memcpy(&buffer[0], ifconf.ifc_buf, ifconf.ifc_len);
+- delete[] ifconf.ifc_buf;
++ free(ifconf.ifc_buf);
+
+ parse_buffer_ioctl(ifconfig(), iftree, AF_INET6, buffer);
+ }
+@@ -204,13 +204,13 @@ ioctl_read_ifconf(int family, ifconf *if
+ for ( ; ; ) {
+ ifconf->ifc_len = ifnum * sizeof(struct ifreq);
+ if (ifconf->ifc_buf != NULL)
+- delete[] ifconf->ifc_buf;
+- ifconf->ifc_buf = new char[ifconf->ifc_len];
++ free(ifconf->ifc_buf);
++ ifconf->ifc_buf = malloc(ifconf->ifc_len);
+ if (ioctl(s, SIOCGIFCONF, ifconf) < 0) {
+ // Check UNPv1, 2e, pp 435 for an explanation why we need this
+ if ((errno != EINVAL) || (lastlen != 0)) {
+ XLOG_ERROR("ioctl(SIOCGIFCONF) failed: %s", strerror(errno));
+- delete[] ifconf->ifc_buf;
++ free(ifconf->ifc_buf);
+ comm_close(s);
+ return false;
+ }