diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2006-04-24 10:02:46 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2006-04-24 10:02:46 +0800 |
commit | 240a48fb9c2cf71958a464320d6bffb5a1c9efd9 (patch) | |
tree | cd26595df069576cc4e2884f816f4e34a29e7381 /net/gnome-nettool | |
parent | 46bdd9432f15cd3609565b632dfcc625599fc90e (diff) | |
download | marcuscom-ports-240a48fb9c2cf71958a464320d6bffb5a1c9efd9.tar marcuscom-ports-240a48fb9c2cf71958a464320d6bffb5a1c9efd9.tar.gz marcuscom-ports-240a48fb9c2cf71958a464320d6bffb5a1c9efd9.tar.bz2 marcuscom-ports-240a48fb9c2cf71958a464320d6bffb5a1c9efd9.tar.lz marcuscom-ports-240a48fb9c2cf71958a464320d6bffb5a1c9efd9.tar.xz marcuscom-ports-240a48fb9c2cf71958a464320d6bffb5a1c9efd9.tar.zst marcuscom-ports-240a48fb9c2cf71958a464320d6bffb5a1c9efd9.zip |
Use proper pointer types to fix crashes on 64-bit platforms.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@6119 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'net/gnome-nettool')
-rw-r--r-- | net/gnome-nettool/Makefile | 3 | ||||
-rw-r--r-- | net/gnome-nettool/files/patch-src_info.c | 13 | ||||
-rw-r--r-- | net/gnome-nettool/files/patch-src_nettool.c | 21 |
3 files changed, 24 insertions, 13 deletions
diff --git a/net/gnome-nettool/Makefile b/net/gnome-nettool/Makefile index 3cdef8521..7f50723d0 100644 --- a/net/gnome-nettool/Makefile +++ b/net/gnome-nettool/Makefile @@ -3,11 +3,12 @@ # Whom: Adam Weinberger <adamw@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/net/gnomenettool/Makefile,v 1.21 2006/04/10 17:02:59 mezz Exp $ +# $MCom: ports/net/gnomenettool/Makefile,v 1.22 2006/04/13 07:52:36 bland Exp $ # PORTNAME= gnomenettool PORTVERSION= 2.14.1 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= net gnome MASTER_SITES= ${MASTER_SITE_GNOME} diff --git a/net/gnome-nettool/files/patch-src_info.c b/net/gnome-nettool/files/patch-src_info.c index 0b8061d36..7faf5e433 100644 --- a/net/gnome-nettool/files/patch-src_info.c +++ b/net/gnome-nettool/files/patch-src_info.c @@ -1,5 +1,5 @@ --- src/info.c.orig Mon Apr 3 15:41:33 2006 -+++ src/info.c Sun Apr 23 20:48:36 2006 ++++ src/info.c Sun Apr 23 21:57:39 2006 @@ -20,6 +20,10 @@ #include <gtk/gtk.h> #include <glib/gi18n.h> @@ -181,12 +181,13 @@ return TRUE; } -@@ -405,8 +499,19 @@ info_get_nic_information (const gchar *n +@@ -405,8 +499,20 @@ info_get_nic_information (const gchar *n InfoIpAddr *ip; gint flags; mii_data_result data; +#ifdef __FreeBSD__ -+ gint hwmib[6], hwlen; ++ gint hwmib[6]; ++ size_t hwlen; + gchar *hwbuf; + guchar *hwptr; + struct if_msghdr *hwifm; @@ -202,7 +203,7 @@ for (ifr6 = ifa0; ifr6; ifr6 = ifr6->ifa_next) { if (strcmp (ifr6->ifa_name, nic) != 0) { -@@ -452,7 +557,9 @@ info_get_nic_information (const gchar *n +@@ -452,7 +558,9 @@ info_get_nic_information (const gchar *n ifc.ifc_req = (struct ifreq *) buf; ioctl (sockfd, SIOCGIFCONF, &ifc); @@ -212,7 +213,7 @@ for (ptr = buf; ptr < buf + ifc.ifc_len;) { ifr = (struct ifreq *) ptr; -@@ -483,6 +590,45 @@ info_get_nic_information (const gchar *n +@@ -483,6 +591,45 @@ info_get_nic_information (const gchar *n (int) ((guchar *) &ifrcopy.ifr_hwaddr.sa_data)[3], (int) ((guchar *) &ifrcopy.ifr_hwaddr.sa_data)[4], (int) ((guchar *) &ifrcopy.ifr_hwaddr.sa_data)[5]); @@ -258,7 +259,7 @@ #else g_sprintf (dst, NOT_AVAILABLE); #endif /* SIOCGIFHWADDR */ -@@ -595,6 +741,8 @@ info_get_nic_information (const gchar *n +@@ -595,6 +742,8 @@ info_get_nic_information (const gchar *n } freeifaddrs (ifa0); diff --git a/net/gnome-nettool/files/patch-src_nettool.c b/net/gnome-nettool/files/patch-src_nettool.c index cae4f648f..d8ac21225 100644 --- a/net/gnome-nettool/files/patch-src_nettool.c +++ b/net/gnome-nettool/files/patch-src_nettool.c @@ -1,14 +1,23 @@ ---- src/nettool.c.orig Fri Jan 7 23:13:56 2005 -+++ src/nettool.c Mon Jan 24 21:03:48 2005 -@@ -22,6 +22,7 @@ - #include <glib/gi18n.h> +--- src/nettool.c.orig Tue May 10 18:14:48 2005 ++++ src/nettool.c Sun Apr 23 22:00:13 2006 +@@ -24,6 +24,7 @@ + #include <string.h> #include <sys/types.h> #include <sys/socket.h> +#include <netinet/in.h> #include <signal.h> #include <errno.h> #include <sys/wait.h> -@@ -357,6 +358,10 @@ +@@ -315,7 +316,7 @@ netinfo_io_text_buffer_dialog (GIOChanne + GIOCondition condition, gpointer data) + { + gchar *text = NULL; +- gint len; ++ gsize len; + Netinfo *netinfo = (Netinfo *) data; + + g_return_val_if_fail (channel != NULL, FALSE); +@@ -360,6 +361,10 @@ netinfo_io_text_buffer_dialog (GIOChanne len, NULL); } @@ -19,7 +28,7 @@ } else if (status == G_IO_STATUS_AGAIN) { char buf[1]; -@@ -368,12 +373,13 @@ +@@ -371,12 +376,13 @@ netinfo_io_text_buffer_dialog (GIOChanne } g_string_append_c (netinfo->command_output, buf[0]); } |