aboutsummaryrefslogtreecommitdiffstats
path: root/devel/libgtop2
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2003-02-09 12:57:58 +0800
committermarcus <marcus@FreeBSD.org>2003-02-09 12:57:58 +0800
commit208feb19b08121d2f7f28c7e5846692445148bce (patch)
tree35d9856c49ef5f8af8d9158fe702ed8209dcc71e /devel/libgtop2
parent6b62eada84085e1d14e4fa1dc71251d6f6464695 (diff)
downloadfreebsd-ports-gnome-208feb19b08121d2f7f28c7e5846692445148bce.tar.gz
freebsd-ports-gnome-208feb19b08121d2f7f28c7e5846692445148bce.tar.zst
freebsd-ports-gnome-208feb19b08121d2f7f28c7e5846692445148bce.zip
Make sure we tack the interface unit number under the end of the if_name.
This should help some network-related gtop clients.
Diffstat (limited to 'devel/libgtop2')
-rw-r--r--devel/libgtop2/Makefile2
-rw-r--r--devel/libgtop2/files/patch-sysdeps_freebsd_netload.c20
2 files changed, 21 insertions, 1 deletions
diff --git a/devel/libgtop2/Makefile b/devel/libgtop2/Makefile
index c437aea009a1..ebfcc6409619 100644
--- a/devel/libgtop2/Makefile
+++ b/devel/libgtop2/Makefile
@@ -7,7 +7,7 @@
PORTNAME= libgtop2
PORTVERSION= 2.0.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME:S/2$//}/2.0
diff --git a/devel/libgtop2/files/patch-sysdeps_freebsd_netload.c b/devel/libgtop2/files/patch-sysdeps_freebsd_netload.c
new file mode 100644
index 000000000000..29ab73bd840f
--- /dev/null
+++ b/devel/libgtop2/files/patch-sysdeps_freebsd_netload.c
@@ -0,0 +1,20 @@
+--- sysdeps/freebsd/netload.c.orig Sun Jan 12 21:40:04 2003
++++ sysdeps/freebsd/netload.c Sat Feb 8 23:52:49 2003
+@@ -83,6 +83,7 @@
+ u_long ifnetaddr, ifnetfound, ifaddraddr;
+ struct sockaddr *sa;
+ char tname [16];
++ char temp [16];
+
+ union {
+ struct ifaddr ifa;
+@@ -113,6 +114,9 @@
+ if (kvm_read (server->machine.kd, (u_long) ifnet.if_name,
+ tname, 16) != 16)
+ glibtop_error_io_r (server, "kvm_read (if_name)");
++ snprintf(temp, (15 - strlen(tname)), "%d", ifnet.if_unit);
++ strcat(tname, temp);
++ tname [15] = 0;
+ #else
+ strncpy (tname, ifnet.if_xname, 16);
+ tname [15] = 0;