diff options
author | joerg <joerg@pkgsrc.org> | 2008-10-02 13:13:05 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2008-10-02 13:13:05 +0000 |
commit | a84cab9d142642326e2f34346d022c482bdafa0d (patch) | |
tree | 3b289a2bc9b4659d2934b8bd40b3d476952deebc /net/xorp/patches | |
parent | b3fea08ff501803f8ba7fb0107c746757489e9dd (diff) | |
download | pkgsrc-a84cab9d142642326e2f34346d022c482bdafa0d.tar.gz |
Add some explicit casts and split a #if to unbreak build on DragonFly as
reported in PR 39667.
Diffstat (limited to 'net/xorp/patches')
-rw-r--r-- | net/xorp/patches/patch-aa | 4 | ||||
-rw-r--r-- | net/xorp/patches/patch-ab | 17 | ||||
-rw-r--r-- | net/xorp/patches/patch-ac | 4 |
3 files changed, 14 insertions, 11 deletions
diff --git a/net/xorp/patches/patch-aa b/net/xorp/patches/patch-aa index f3080599e65..535d2abe0f3 100644 --- a/net/xorp/patches/patch-aa +++ b/net/xorp/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.5 2008/09/30 15:03:11 joerg Exp $ +$NetBSD: patch-aa,v 1.6 2008/10/02 13:13:05 joerg Exp $ --- libxipc/sockutil.cc.orig 2008-09-30 15:19:41.000000000 +0200 +++ libxipc/sockutil.cc @@ -9,7 +9,7 @@ $NetBSD: patch-aa,v 1.5 2008/09/30 15:03:11 joerg Exp $ - delete[] ifconf.ifc_buf; - ifconf.ifc_buf = new char[ifconf.ifc_len]; + free(ifconf.ifc_buf); -+ ifconf.ifc_buf = malloc(ifconf.ifc_len); ++ ifconf.ifc_buf = (char *)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)) { diff --git a/net/xorp/patches/patch-ab b/net/xorp/patches/patch-ab index 607e130505d..2e7dfcd152b 100644 --- a/net/xorp/patches/patch-ab +++ b/net/xorp/patches/patch-ab @@ -1,18 +1,21 @@ -$NetBSD: patch-ab,v 1.5 2008/09/30 15:03:11 joerg Exp $ +$NetBSD: patch-ab,v 1.6 2008/10/02 13:13:05 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 +@@ -731,7 +731,15 @@ ClickSocket::mount_click_file_system(str + #ifdef HOST_OS_LINUX 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) +-#else // ! HOST_OS_LINUX ++#elif defined(__NetBSD__) && defined(__NetBSD_Prereq__) ++# if __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 ++#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 index f5e10b83185..61dd51efb89 100644 --- a/net/xorp/patches/patch-ac +++ b/net/xorp/patches/patch-ac @@ -1,4 +1,4 @@ -$NetBSD: patch-ac,v 1.3 2008/09/30 15:03:11 joerg Exp $ +$NetBSD: patch-ac,v 1.4 2008/10/02 13:13:05 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 @@ -27,7 +27,7 @@ $NetBSD: patch-ac,v 1.3 2008/09/30 15:03:11 joerg Exp $ - delete[] ifconf->ifc_buf; - ifconf->ifc_buf = new char[ifconf->ifc_len]; + free(ifconf->ifc_buf); -+ ifconf->ifc_buf = malloc(ifconf->ifc_len); ++ ifconf->ifc_buf = (char *)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)) { |