summaryrefslogtreecommitdiffstats
path: root/devel/libgtop2
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2004-03-12 05:35:58 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2004-03-12 05:35:58 +0800
commitc0dc5330922e65dd62dcfdcec3a961030946f392 (patch)
treedae0f13ea717ab249430342d9ed16a79c33ea327 /devel/libgtop2
parent6be49913f2ec44a4dba387df5aa0818c8dc8a0d9 (diff)
downloadmarcuscom-ports-c0dc5330922e65dd62dcfdcec3a961030946f392.tar
marcuscom-ports-c0dc5330922e65dd62dcfdcec3a961030946f392.tar.gz
marcuscom-ports-c0dc5330922e65dd62dcfdcec3a961030946f392.tar.bz2
marcuscom-ports-c0dc5330922e65dd62dcfdcec3a961030946f392.tar.lz
marcuscom-ports-c0dc5330922e65dd62dcfdcec3a961030946f392.tar.xz
marcuscom-ports-c0dc5330922e65dd62dcfdcec3a961030946f392.tar.zst
marcuscom-ports-c0dc5330922e65dd62dcfdcec3a961030946f392.zip
Update to 2.5.2. There were a lot of consolidated patches, so this really
needs to be tested out. git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@2033 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'devel/libgtop2')
-rw-r--r--devel/libgtop2/Makefile8
-rw-r--r--devel/libgtop2/distinfo4
-rw-r--r--devel/libgtop2/files/patch-ah67
-rw-r--r--devel/libgtop2/files/patch-aj243
-rw-r--r--devel/libgtop2/files/patch-configure15
-rw-r--r--devel/libgtop2/files/patch-src_daemon_Makefile.in26
-rw-r--r--devel/libgtop2/files/patch-sysdeps::freebsd::prockernel.c145
-rw-r--r--devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c46
-rw-r--r--devel/libgtop2/files/patch-sysdeps::freebsd::proctime.c129
-rw-r--r--devel/libgtop2/files/patch-sysdeps::freebsd::swap.c20
-rw-r--r--devel/libgtop2/files/patch-sysdeps_common_fsusage.h25
-rw-r--r--devel/libgtop2/files/patch-sysdeps_freebsd_mem.c11
-rw-r--r--devel/libgtop2/files/patch-sysdeps_freebsd_netload.c81
-rw-r--r--devel/libgtop2/files/patch-sysdeps_freebsd_procargs.c11
-rw-r--r--devel/libgtop2/files/patch-sysdeps_freebsd_uptime.c13
15 files changed, 81 insertions, 763 deletions
diff --git a/devel/libgtop2/Makefile b/devel/libgtop2/Makefile
index f61778884..d7ee952a1 100644
--- a/devel/libgtop2/Makefile
+++ b/devel/libgtop2/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= libgtop2
-PORTVERSION= 2.5.1
+PORTVERSION= 2.5.2
CATEGORIES= devel gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME:S/2$//}/2.5
@@ -16,11 +16,13 @@ DIST_SUBDIR= gnome2
MAINTAINER= gnome@FreeBSD.org
COMMENT= GNOME 2 top library
+LIB_DEPENDS= popt.0:${PORTSDIR}/devel/popt
+
USE_BZIP2= yes
-USE_X_PREFIX= yes
USE_PERL5= yes
+USE_X_PREFIX= yes
USE_GMAKE= yes
-USE_GNOME= gnomehack libgnome
+USE_GNOME= gnomehack glib20
USE_REINPLACE= yes
INSTALLS_SHLIB= yes
GNU_CONFIGURE= yes
diff --git a/devel/libgtop2/distinfo b/devel/libgtop2/distinfo
index 4cc46bc20..7614d6251 100644
--- a/devel/libgtop2/distinfo
+++ b/devel/libgtop2/distinfo
@@ -1,2 +1,2 @@
-MD5 (gnome2/libgtop-2.5.1.tar.bz2) = b419ebf3778ee0ef998f100eb8be8de8
-SIZE (gnome2/libgtop-2.5.1.tar.bz2) = 873450
+MD5 (gnome2/libgtop-2.5.2.tar.bz2) = 92b9665293df3b54a00ddfda40c9d04e
+SIZE (gnome2/libgtop-2.5.2.tar.bz2) = 935545
diff --git a/devel/libgtop2/files/patch-ah b/devel/libgtop2/files/patch-ah
index 87ff5c383..734fb0a3f 100644
--- a/devel/libgtop2/files/patch-ah
+++ b/devel/libgtop2/files/patch-ah
@@ -1,8 +1,8 @@
---- sysdeps/freebsd/procmap.c.orig Mon Oct 20 11:19:50 2003
-+++ sysdeps/freebsd/procmap.c Fri Nov 14 14:44:40 2003
-@@ -32,7 +32,11 @@
- #include <sys/proc.h>
+--- sysdeps/freebsd/procmap.c.orig Wed Mar 10 21:23:52 2004
++++ sysdeps/freebsd/procmap.c Thu Mar 11 16:04:21 2004
+@@ -33,7 +33,11 @@
#include <sys/resource.h>
+ #if defined(__NetBSD__) && (__NetBSD_Version__ < 105020000)
#include <vm/vm_object.h>
+#if (__FreeBSD_version >= 400011)
+#include <vm/vm.h>
@@ -10,67 +10,30 @@
#include <vm/vm_prot.h>
+#endif
#include <vm/vm_map.h>
-
- #include <sys/vnode.h>
-@@ -90,8 +94,9 @@
+ #elif defined(__NetBSD__) && (__NetBSD_Version__ >= 105020000)
+ #include <uvm/uvm_extern.h>
+@@ -104,7 +108,7 @@
glibtop_map_entry *maps;
#if defined __FreeBSD__
struct vnode vnode;
+-#if __FreeBSD_version >= 500039
+#if __FreeBSD_version < 500039
struct inode inode;
-- struct mount mount;
-+#endif
#endif
- int count, i = 0;
- int update = 0;
-@@ -107,13 +112,19 @@
+ #endif
+@@ -122,8 +126,10 @@
/* Get the process data */
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count);
- if ((pinfo == NULL) || (count < 1))
-- glibtop_error_io_r (server, "kvm_getprocs (%d)", pid);
+ if ((pinfo == NULL) || (count < 1)) {
-+ glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
+ glibtop_error_io_r (server, "kvm_getprocs (%d)", pid);
+ return NULL;
+ }
/* Now we get the memory maps. */
- if (kvm_read (server->machine.kd,
-+#if (__FreeBSD_version >= 500013)
-+ (unsigned long) pinfo [0].ki_vmspace,
-+#else
- (unsigned long) pinfo [0].kp_proc.p_vmspace,
-+#endif
- (char *) &vmspace, sizeof (vmspace)) != sizeof (vmspace))
- glibtop_error_io_r (server, "kvm_read (vmspace)");
-
-@@ -131,7 +142,7 @@
-
- buf->total = buf->number * buf->size;
-
-- maps = g_malloc (server, buf->total);
-+ maps = g_malloc (buf->total);
-
- memset (maps, 0, buf->total);
-
-@@ -243,6 +254,15 @@
- &vnode, sizeof (vnode)) != sizeof (vnode))
- glibtop_error_io_r (server, "kvm_read (vnode)");
-
-+#if __FreeBSD_version >= 500039
-+ switch (vnode.v_type) {
-+ case VREG:
-+ maps [i-1].inode = vnode.v_cachedid;
-+ maps [i-1].device = vnode.v_cachedfs;
-+ default:
-+ continue;
-+ }
-+#else
- if ((vnode.v_type != VREG) || (vnode.v_tag != VT_UFS) ||
- !vnode.v_data) continue;
-
-@@ -251,13 +271,9 @@
+@@ -280,10 +286,6 @@
&inode, sizeof (inode)) != sizeof (inode))
glibtop_error_io_r (server, "kvm_read (inode)");
@@ -78,10 +41,6 @@
- (unsigned long) vnode.v_mount,
- &mount, sizeof (mount)) != sizeof (mount))
- glibtop_error_io_r (server, "kvm_read (mount)");
--
+ #endif
maps [i-1].inode = inode.i_number;
maps [i-1].device = inode.i_dev;
-+#endif
- #endif
- } while (entry.next != first);
-
diff --git a/devel/libgtop2/files/patch-aj b/devel/libgtop2/files/patch-aj
deleted file mode 100644
index b7ea24eba..000000000
--- a/devel/libgtop2/files/patch-aj
+++ /dev/null
@@ -1,243 +0,0 @@
---- sysdeps/freebsd/proclist.c.orig Thu May 27 23:04:05 1999
-+++ sysdeps/freebsd/proclist.c Sun Sep 7 20:37:30 2003
-@@ -86,13 +86,24 @@
- pids = glibtop_realloc_r (server, pids, count * sizeof (unsigned));
- /* Copy the pids over to this chain */
- for (i=j=0; i < count; i++) {
-+#if __FreeBSD_version >= 500013
-+#define XXX_P_STAT ki_stat
-+#define XXX_P_RUID ki_ruid
-+#define XXX_P_PID ki_pid
-+
-+#else
-+#define XXX_P_STAT kp_proc.p_stat
-+#define XXX_P_RUID kp_eproc.e_pcred.p_ruid
-+#define XXX_P_PID kp_proc.p_pid
-+
-+#endif
- if ((real_which & GLIBTOP_EXCLUDE_IDLE) &&
-- (pinfo[i].kp_proc.p_stat != SRUN))
-+ (pinfo[i].XXX_P_STAT != SRUN))
- continue;
- else if ((real_which & GLIBTOP_EXCLUDE_SYSTEM) &&
-- (pinfo[i].kp_eproc.e_pcred.p_ruid == 0))
-+ (pinfo[i].XXX_P_RUID == 0))
- continue;
-- pids [j++] = (unsigned) pinfo[i].kp_proc.p_pid;
-+ pids [j++] = (unsigned) pinfo[i].XXX_P_PID;
- } /* end for */
- /* Set the fields in buf */
- buf->number = j;
---- sysdeps/freebsd/procstate.c.orig Sun Oct 17 03:01:39 1999
-+++ sysdeps/freebsd/procstate.c Sun Sep 7 20:37:30 2003
-@@ -28,7 +28,7 @@
- #include <glibtop_suid.h>
-
- #if !defined(__OpenBSD__)
--//&& (!defined __bsdi__)
-+/*&& (!defined __bsdi__)*/
- #include <sys/user.h>
- #endif
-
-@@ -37,11 +37,7 @@
- (1L << GLIBTOP_PROC_STATE_GID);
-
- static const unsigned long _glibtop_sysdeps_proc_state_new =
--#if LIBGTOP_VERSION_CODE >= 1001000
--(1L << GLIBTOP_PROC_STATE_RUID) + (1L << GLIBTOP_PROC_STATE_RGID);
--#else
- 0;
--#endif
-
- /* Init function. */
-
-@@ -76,43 +72,35 @@
- return;
- }
-
-- strncpy (buf->cmd, pinfo [0].kp_proc.p_comm, sizeof (buf->cmd)-1);
-- buf->cmd [sizeof (buf->cmd)-1] = 0;
-+#if __FreeBSD_version >= 500013
-+#define XXX_P_COMM ki_comm
-+#define XXX_P_SVUID ki_svuid
-+#define XXX_P_SVGID ki_svgid
-+#define XXX_P_RUID ki_ruid
-+#define XXX_P_RGID ki_rgid
-+#define XXX_P_STAT ki_stat
-
-- buf->uid = pinfo [0].kp_eproc.e_pcred.p_svuid;
-- buf->gid = pinfo [0].kp_eproc.e_pcred.p_svgid;
-+#else
-+#define XXX_P_COMM kp_proc.p_comm
-+#define XXX_P_SVUID kp_eproc.e_pcred.p_svuid
-+#define XXX_P_SVGID kp_eproc.e_pcred.p_svgid
-+#define XXX_P_RUID kp_eproc.e_pcred.p_ruid
-+#define XXX_P_RGID kp_eproc.e_pcred.p_rgid
-+#define XXX_P_STAT kp_proc.p_stat
-
--#if LIBGTOP_VERSION_CODE >= 1001000
-- buf->ruid = pinfo [0].kp_eproc.e_pcred.p_ruid;
-- buf->rgid = pinfo [0].kp_eproc.e_pcred.p_rgid;
- #endif
-
-+ strncpy (buf->cmd, pinfo [0].XXX_P_COMM, sizeof (buf->cmd)-1);
-+ buf->cmd [sizeof (buf->cmd)-1] = 0;
-+
-+ buf->uid = pinfo [0].XXX_P_SVUID;
-+ buf->gid = pinfo [0].XXX_P_SVGID;
-+
- /* Set the flags for the data we're about to return*/
- buf->flags = _glibtop_sysdeps_proc_state |
- _glibtop_sysdeps_proc_state_new;
-
--#if LIBGTOP_VERSION_CODE >= 1001000
-- switch (pinfo [0].kp_proc.p_stat) {
-- case SIDL:
-- buf->state = 0;
-- break;
-- case SRUN:
-- buf->state = GLIBTOP_PROCESS_RUNNING;
-- break;
-- case SSLEEP:
-- buf->state = GLIBTOP_PROCESS_INTERRUPTIBLE;
-- break;
-- case SSTOP:
-- buf->state = GLIBTOP_PROCESS_STOPPED;
-- break;
-- case SZOMB:
-- buf->state = GLIBTOP_PROCESS_ZOMBIE;
-- break;
-- default:
-- return;
-- }
--#else
-- switch (pinfo [0].kp_proc.p_stat) {
-+ switch (pinfo [0].XXX_P_STAT) {
- case SIDL:
- buf->state = 'S';
- break;
-@@ -131,7 +119,6 @@
- default:
- return;
- }
--#endif
-
- buf->flags |= (1L << GLIBTOP_PROC_STATE_STATE);
- }
---- sysdeps/freebsd/procuid.c.orig Fri Sep 17 06:08:07 1999
-+++ sysdeps/freebsd/procuid.c Sun Sep 7 20:37:30 2003
-@@ -84,17 +84,46 @@
- return;
- }
-
-- buf->uid = pinfo [0].kp_eproc.e_pcred.p_ruid;
-- buf->euid = pinfo [0].kp_eproc.e_pcred.p_svuid;
-- buf->gid = pinfo [0].kp_eproc.e_pcred.p_rgid;
-- buf->egid = pinfo [0].kp_eproc.e_pcred.p_svgid;
--
-- buf->ppid = pinfo [0].kp_eproc.e_ppid;
-- buf->pgrp = pinfo [0].kp_eproc.e_pgid;
-- buf->tpgid = pinfo [0].kp_eproc.e_tpgid;
-+#if __FreeBSD_version >= 500013
-
-- buf->nice = pinfo [0].kp_proc.p_nice;
-- buf->priority = pinfo [0].kp_proc.p_priority;
-+#define XXX_P_RUID ki_ruid
-+#define XXX_P_SVUID ki_svuid
-+#define XXX_P_RGID ki_rgid
-+#define XXX_P_SVGID ki_svgid
-+#define XXX_E_PPID ki_ppid
-+#define XXX_E_PGID ki_pgid
-+#define XXX_E_TPGID ki_tpgid
-+#define XXX_P_NICE ki_nice
-+#if __FreeBSD_version >= 500013
-+#define XXX_P_PRIORITY ki_pri.pri_user
-+#else
-+#define XXX_P_PRIORITY ki_priority
-+#endif
-+#else
-+
-+#define XXX_P_RUID kp_eproc.e_pcred.p_ruid
-+#define XXX_P_SVUID kp_eproc.e_pcred.p_svuid
-+#define XXX_P_RGID kp_eproc.e_pcred.p_rgid
-+#define XXX_P_SVGID kp_eproc.e_pcred.p_svgid
-+#define XXX_E_PPID kp_eproc.e_ppid
-+#define XXX_E_PGID kp_eproc.e_pgid
-+#define XXX_E_TPGID kp_eproc.e_tpgid
-+#define XXX_P_NICE kp_proc.p_nice
-+#define XXX_P_PRIORITY kp_proc.p_priority
-+
-+#endif
-+
-+ buf->uid = pinfo [0].XXX_P_RUID;
-+ buf->euid = pinfo [0].XXX_P_SVUID;
-+ buf->gid = pinfo [0].XXX_P_RGID;
-+ buf->egid = pinfo [0].XXX_P_SVGID;
-+
-+ buf->ppid = pinfo [0].XXX_E_PPID;
-+ buf->pgrp = pinfo [0].XXX_E_PGID;
-+ buf->tpgid = pinfo [0].XXX_E_TPGID;
-+
-+ buf->nice = pinfo [0].XXX_P_NICE;
-+ buf->priority = pinfo [0].XXX_P_PRIORITY;
-
- /* Set the flags for the data we're about to return*/
- buf->flags = _glibtop_sysdeps_proc_uid;
---- sysdeps/freebsd/procsignal.c.orig Mon Feb 14 06:31:39 2000
-+++ sysdeps/freebsd/procsignal.c Sun Sep 7 20:37:30 2003
-@@ -67,11 +67,27 @@
- return;
- }
-
-+#if __FreeBSD_version >= 500013
-+
-+#define XXX_P_SIGLIST ki_siglist
-+#define XXX_P_SIGMASK ki_sigmask
-+#define XXX_P_SIGIGNORE ki_sigignore
-+#define XXX_P_SIGCATCH ki_sigcatch
-+
-+#else
-+
-+#define XXX_P_SIGLIST kp_proc.p_siglist
-+#define XXX_P_SIGMASK kp_proc.p_sigmask
-+#define XXX_P_SIGIGNORE kp_proc.p_sigignore
-+#define XXX_P_SIGCATCH kp_proc.p_sigcatch
-+
-+#endif
-+
- /* signal: mask of pending signals.
- * pinfo [0].kp_proc.p_siglist
- */
- #if (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011)
-- buf->signal [0] = pinfo [0].kp_proc.p_siglist.__bits[0];
-+ buf->signal [0] = pinfo [0].XXX_P_SIGLIST.__bits[0];
- #else
- buf->signal [0] = pinfo [0].kp_proc.p_siglist;
- #endif
-@@ -80,7 +96,7 @@
- * pinfo [0].kp_proc.p_sigmask
- */
- #if (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011)
-- buf->blocked [0] = pinfo [0].kp_proc.p_sigmask.__bits[0];
-+ buf->blocked [0] = pinfo [0].XXX_P_SIGMASK.__bits[0];
- #else
- buf->blocked [0] = pinfo [0].kp_proc.p_sigmask;
- #endif
-@@ -89,7 +105,7 @@
- * pinfo [0].kp_proc.p_sigignore
- */
- #if (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011)
-- buf->sigignore [0] = pinfo [0].kp_proc.p_sigignore.__bits[0];
-+ buf->sigignore [0] = pinfo [0].XXX_P_SIGIGNORE.__bits[0];
- #else
- buf->sigignore [0] = pinfo [0].kp_proc.p_sigignore;
- #endif
-@@ -98,7 +114,7 @@
- * pinfo [0].kp_proc.p_sigcatch
- */
- #if (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011)
-- buf->sigcatch [0] = pinfo [0].kp_proc.p_sigcatch.__bits[0];
-+ buf->sigcatch [0] = pinfo [0].XXX_P_SIGCATCH.__bits[0];
- #else
- buf->sigcatch [0] = pinfo [0].kp_proc.p_sigcatch;
- #endif
diff --git a/devel/libgtop2/files/patch-configure b/devel/libgtop2/files/patch-configure
index 98b7832da..662f75ac3 100644
--- a/devel/libgtop2/files/patch-configure
+++ b/devel/libgtop2/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig Tue Jan 6 09:20:30 2004
-+++ configure Tue Jan 6 21:32:03 2004
-@@ -1854,9 +1854,9 @@
+--- configure.orig Thu Mar 11 15:38:00 2004
++++ configure Thu Mar 11 15:38:00 2004
+@@ -1917,9 +1917,9 @@
# libtool versioning
LT_RELEASE=$LIBGTOP_MAJOR_VERSION.$LIBGTOP_MINOR_VERSION
@@ -13,12 +13,3 @@
LT_VERSION_INFO="-version-info ${LT_CURRENT}:${LT_REVISION}:${LT_AGE}"
-@@ -10200,7 +10200,7 @@
-
- echo "$as_me:$LINENO: checking GLIB_LIBS" >&5
- echo $ECHO_N "checking GLIB_LIBS... $ECHO_C" >&6
-- GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= $GLIB_REQUIRED libgnome-2.0"`
-+ GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= $GLIB_REQUIRED"`
- echo "$as_me:$LINENO: result: $GLIB_LIBS" >&5
- echo "${ECHO_T}$GLIB_LIBS" >&6
- else
diff --git a/devel/libgtop2/files/patch-src_daemon_Makefile.in b/devel/libgtop2/files/patch-src_daemon_Makefile.in
deleted file mode 100644
index 0cfc6debb..000000000
--- a/devel/libgtop2/files/patch-src_daemon_Makefile.in
+++ /dev/null
@@ -1,26 +0,0 @@
---- src/daemon/Makefile.in.orig Tue Jan 6 21:32:29 2004
-+++ src/daemon/Makefile.in Tue Jan 6 21:41:46 2004
-@@ -86,7 +86,7 @@
- LIBGTOP_EXTRA_LIBS = @LIBGTOP_EXTRA_LIBS@
- LIBGTOP_INCS = @LIBGTOP_INCS@
- LIBGTOP_INTERFACE_AGE = @LIBGTOP_INTERFACE_AGE@
--LIBGTOP_LIBS = @LIBGTOP_LIBS@
-+LIBGTOP_LIBS =
- LIBGTOP_MAJOR_VERSION = @LIBGTOP_MAJOR_VERSION@
- LIBGTOP_MICRO_VERSION = @LIBGTOP_MICRO_VERSION@
- LIBGTOP_MINOR_VERSION = @LIBGTOP_MINOR_VERSION@
-@@ -160,11 +160,14 @@
- @sysdeps_suid_lib@ \
- $(suid_sysdeps) $(suid_common)\
- $(LIBGTOP_LIBS)\
-+ $(GLIB_LIBS) \
-+ -lpopt \
- @libs_xauth@
-
-
- libgtop_server2_SOURCES = server.c slave.c io.c version.c daemon.h
- libgtop_server2_LDADD = $(GLIB_LIBS) $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps_suid-2.0.la \
-+ -lpopt \
- $(top_builddir)/sysdeps/common/libgtop_suid_common-2.0.la
-
-
diff --git a/devel/libgtop2/files/patch-sysdeps::freebsd::prockernel.c b/devel/libgtop2/files/patch-sysdeps::freebsd::prockernel.c
deleted file mode 100644
index 0e8850f65..000000000
--- a/devel/libgtop2/files/patch-sysdeps::freebsd::prockernel.c
+++ /dev/null
@@ -1,145 +0,0 @@
---- sysdeps/freebsd/prockernel.c.orig Tue Oct 21 18:54:24 2003
-+++ sysdeps/freebsd/prockernel.c Sun Feb 15 15:34:42 2004
-@@ -34,12 +34,6 @@
- #if (!defined __OpenBSD__) && (!defined __bsdi__)
- #include <sys/user.h>
- #endif
--#if !defined(__bsdi__) && !(defined(__FreeBSD__) && defined(__alpha__))
--#include <machine/pcb.h>
--#endif
--#if defined(__FreeBSD__) && !defined(__alpha__)
--#include <machine/tss.h>
--#endif
-
- #include <unistd.h>
- #include <fcntl.h>
-@@ -78,14 +72,8 @@
- pid_t pid)
- {
- struct kinfo_proc *pinfo;
-- struct user *u_addr = (struct user *)USRSTACK;
-- struct pstats pstats;
-- struct pcb pcb;
- int count;
-
-- char filename [BUFSIZ];
-- struct stat statb;
--
- glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_KERNEL), 0);
-
- memset (buf, 0, sizeof (glibtop_proc_kernel));
-@@ -98,14 +86,30 @@
-
- /* Get the process information */
- pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count);
-- if ((pinfo == NULL) || (count != 1))
-- glibtop_error_io_r (server, "kvm_getprocs (%d)", pid);
-+ if ((pinfo == NULL) || (count != 1)) {
-+ glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
-+ return;
-+ }
-+
-+#if __FreeBSD_version >= 500013
-+
-+#define XXX_P_WCHAN ki_wchan
-+#define XXX_P_WMESG ki_wmesg
-+#define XXX_E_WMESG ki_wmesg
-
-- buf->nwchan = (unsigned long) pinfo [0].kp_proc.p_wchan &~ KERNBASE;
-+#else
-+
-+#define XXX_P_WCHAN kp_proc.p_wchan
-+#define XXX_P_WMESG kp_proc.p_wmesg
-+#define XXX_E_WMESG kp_eproc.e_wmesg
-+
-+#endif
-+
-+ buf->nwchan = (unsigned long) pinfo [0].XXX_P_WCHAN &~ KERNBASE;
- buf->flags |= (1L << GLIBTOP_PROC_KERNEL_NWCHAN);
-
-- if (pinfo [0].kp_proc.p_wchan && pinfo [0].kp_proc.p_wmesg) {
-- strncpy (buf->wchan, pinfo [0].kp_eproc.e_wmesg,
-+ if (pinfo [0].XXX_P_WCHAN && pinfo [0].XXX_P_WMESG) {
-+ strncpy (buf->wchan, pinfo [0].XXX_E_WMESG,
- sizeof (buf->wchan) - 1);
- buf->wchan [sizeof (buf->wchan) - 1] = 0;
- buf->flags |= (1L << GLIBTOP_PROC_KERNEL_WCHAN);
-@@ -113,72 +117,10 @@
- buf->wchan [0] = 0;
- }
-
-- /* Taken from `saveuser ()' in `/usr/src/bin/ps/ps.c'. */
--
-- /* [FIXME]: /usr/include/sys/user.h tells me that the user area
-- * may or may not be at the same kernel address in all
-- * processes, but I don't see any way to get that address.
-- * Since `ps' simply uses its own address, I think it's
-- * safe to do this here, too. */
--
-- /* NOTE: You need to mount the /proc filesystem to make
-- * `kvm_uread' work. */
--
-- sprintf (filename, "/proc/%d/mem", (int) pid);
-- if (stat (filename, &statb)) return;
--
-- glibtop_suid_enter (server);
--
-- if ((pinfo [0].kp_proc.p_flag & P_INMEM) &&
-- kvm_uread (server->machine.kd, &(pinfo [0]).kp_proc,
-- (unsigned long) &u_addr->u_stats,
-- (char *) &pstats, sizeof (pstats)) == sizeof (pstats))
-- {
-- /*
-- * The u-area might be swapped out, and we can't get
-- * at it because we have a crashdump and no swap.
-- * If it's here fill in these fields, otherwise, just
-- * leave them 0.
-- */
--
-- buf->min_flt = (guint64) pstats.p_ru.ru_minflt;
-- buf->maj_flt = (guint64) pstats.p_ru.ru_majflt;
-- buf->cmin_flt = (guint64) pstats.p_cru.ru_minflt;
-- buf->cmaj_flt = (guint64) pstats.p_cru.ru_majflt;
--
-- buf->flags |= _glibtop_sysdeps_proc_kernel_pstats;
-- }
--
-- if ((pinfo [0].kp_proc.p_flag & P_INMEM) &&
-- kvm_uread (server->machine.kd, &(pinfo [0]).kp_proc,
-- (unsigned long) &u_addr->u_pcb,
-- (char *) &pcb, sizeof (pcb)) == sizeof (pcb))
-- {
--#ifdef __FreeBSD__
--#ifndef __alpha__
--#if (__FreeBSD_version >= 300003)
-- buf->kstk_esp = (guint64) pcb.pcb_esp;
-- buf->kstk_eip = (guint64) pcb.pcb_eip;
--#else
-- buf->kstk_esp = (guint64) pcb.pcb_ksp;
-- buf->kstk_eip = (guint64) pcb.pcb_pc;
--#endif
--#else
-- /*xxx FreeBSD/Alpha? */
--#endif
--#else
-- buf->kstk_esp = (guint64) pcb.pcb_tss.tss_esp0;
--#ifdef __bsdi__
-- buf->kstk_eip = (guint64) pcb.pcb_tss.tss_eip;
--#else
-- buf->kstk_eip = (guint64) pcb.pcb_tss.__tss_eip;
--#endif
--
-- buf->flags |= _glibtop_sysdeps_proc_kernel_pcb;
--#endif
-- }
--
-- /* Taken from `wchan ()' in `/usr/src/bin/ps/print.c'. */
--
-- glibtop_suid_leave (server);
-+ /* XXX: the code here was, quite frankly, junk, and almost
-+ * certainly wrong - remove it all, leave these fields
-+ * unpopulated, and give up until such time as the right
-+ * code is produced for both FreeBSD 4.x and 5.x
-+ */
-+ return;
- }
diff --git a/devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c b/devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c
index 5cab09957..e61274b13 100644
--- a/devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c
+++ b/devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c
@@ -1,6 +1,6 @@
---- sysdeps/freebsd/procmem.c.orig Tue Oct 21 18:54:24 2003
-+++ sysdeps/freebsd/procmem.c Sun Feb 15 15:43:11 2004
-@@ -117,7 +117,7 @@
+--- sysdeps/freebsd/procmem.c.orig Wed Mar 10 21:23:52 2004
++++ sysdeps/freebsd/procmem.c Thu Mar 11 15:46:05 2004
+@@ -125,7 +125,7 @@
#else
struct vm_object object;
#endif
@@ -9,32 +9,16 @@
int count;
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_MEM), 0);
-@@ -136,16 +136,28 @@
- glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
- return;
- }
-+#if __FreeBSD_version >= 500013
+@@ -160,15 +160,12 @@
+
+ #define PROC_VMSPACE kp_proc.p_vmspace
- if (kvm_read (server->machine.kd,
-- (unsigned long) pinfo [0].kp_proc.p_limit,
+- (unsigned long) pinfo [0].PROC_VMSPACE,
- (char *) &plimit, sizeof (plimit)) != sizeof (plimit)) {
- glibtop_warn_io_r (server, "kvm_read (plimit)");
-+#define XXX_P_VMSPACE ki_vmspace
-+ buf->rss_rlim = pinfo [0].ki_rssize;
-+
-+ buf->vsize = (u_int64_t) pinfo [0].ki_size;
-+ buf->size = (u_int64_t) pagetok
-+ (pinfo [0].ki_tsize + pinfo [0].ki_dsize + pinfo[0].ki_ssize)
-+ << LOG1024;
-+ buf->resident = buf->rss = (u_int64_t) pagetok
-+ (pinfo [0].ki_rssize) << LOG1024;
-+
-+#else
-+
-+#define XXX_P_VMSPACE kp_proc.p_vmspace
-+
+ if (getrlimit (RLIMIT_RSS, &rlimit) < 0) {
-+ glibtop_warn_io_r (server, "getrlimit");
++ glibtop_warn_io_r (server, "getrlimit");
return;
}
@@ -44,17 +28,3 @@
vms = &pinfo [0].kp_eproc.e_vm;
-@@ -154,11 +166,12 @@
-
- buf->resident = buf->rss = (guint64) pagetok
- (vms->vm_rssize) << LOG1024;
-+#endif
-
- /* Now we get the shared memory. */
-
- if (kvm_read (server->machine.kd,
-- (unsigned long) pinfo [0].kp_proc.p_vmspace,
-+ (unsigned long) pinfo [0].XXX_P_VMSPACE,
- (char *) &vmspace, sizeof (vmspace)) != sizeof (vmspace)) {
- glibtop_warn_io_r (server, "kvm_read (vmspace)");
- return;
diff --git a/devel/libgtop2/files/patch-sysdeps::freebsd::proctime.c b/devel/libgtop2/files/patch-sysdeps::freebsd::proctime.c
index ab4c2b7af..37b5b56df 100644
--- a/devel/libgtop2/files/patch-sysdeps::freebsd::proctime.c
+++ b/devel/libgtop2/files/patch-sysdeps::freebsd::proctime.c
@@ -1,24 +1,14 @@
---- sysdeps/freebsd/proctime.c.orig Tue Oct 21 18:54:24 2003
-+++ sysdeps/freebsd/proctime.c Sun Feb 15 15:45:44 2004
-@@ -57,6 +57,7 @@
- * system, and interrupt time usage.
- */
+--- sysdeps/freebsd/proctime.c.orig Wed Mar 10 21:23:52 2004
++++ sysdeps/freebsd/proctime.c Thu Mar 11 15:47:35 2004
+@@ -59,6 +59,7 @@
+
+ #ifndef __FreeBSD__
+#ifndef __FreeBSD__
static void
calcru(p, up, sp, ip)
struct proc *p;
-@@ -66,9 +67,6 @@
- {
- quad_t totusec;
- u_quad_t u, st, ut, it, tot;
--#if (__FreeBSD_version < 300003)
-- long sec, usec;
--#endif
- struct timeval tv;
-
- st = p->p_sticks;
-@@ -81,19 +79,10 @@
+@@ -81,19 +82,10 @@
tot = 1;
}
@@ -38,116 +28,21 @@
if (totusec < 0) {
/* XXX no %qd in kernel. Truncate. */
-@@ -116,6 +105,7 @@
+@@ -116,6 +108,7 @@
ip->tv_usec = it % 1000000;
}
}
+#endif
- /* Provides detailed information about a process. */
+ #endif /* !__FreeBSD__ */
-@@ -132,9 +122,6 @@
+@@ -133,9 +126,6 @@
+ #endif
struct pstats pstats;
int count;
-
+-
- char filename [BUFSIZ];
- struct stat statb;
--
+
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_TIME), 0);
- memset (buf, 0, sizeof (glibtop_proc_time));
-@@ -142,25 +129,23 @@
- /* It does not work for the swapper task. */
- if (pid == 0) return;
-
--#if !(defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000))
-+#if (defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000))
- if (server->sysdeps.proc_time == 0)
- return;
-
--#ifndef __bsdi__
-- sprintf (filename, "/proc/%d/mem", (int) pid);
-- if (stat (filename, &statb)) return;
--#endif
- #endif
-
- /* Get the process information */
- pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count);
-- if ((pinfo == NULL) || (count != 1))
-- glibtop_error_io_r (server, "kvm_getprocs (%d)", pid);
-+ if ((pinfo == NULL) || (count != 1)) {
-+ glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
-+ return;
-+ }
-
--#if (defined __FreeBSD__) && (__FreeBSD_version >= 300003)
-- buf->rtime = pinfo [0].kp_proc.p_runtime;
-+#if (defined __FreeBSD__) && (__FreeBSD_version >= 500013)
-+ buf->rtime = pinfo [0].ki_runtime;
- #else
-- buf->rtime = tv2sec (pinfo [0].kp_proc.p_rtime);
-+ buf->rtime = pinfo [0].kp_proc.p_runtime;
- #endif
-
- buf->frequency = 1000000;
-@@ -192,6 +177,21 @@
-
- buf->flags |= _glibtop_sysdeps_proc_time_user;
- #else
-+#if __FreeBSD_version >= 500013
-+#if __FreeBSD_version >= 500016
-+ if ((pinfo [0].ki_sflag & PS_INMEM)) {
-+#else
-+ if ((pinfo [0].ki_flag & P_INMEM)) {
-+#endif
-+ buf->utime = pinfo [0].ki_runtime;
-+ buf->stime = 0; /* XXX */
-+ buf->cutime = tv2sec (pinfo [0].ki_childtime);
-+ buf->cstime = 0; /* XXX */
-+ buf->start_time = tv2sec (pinfo [0].ki_start);
-+ buf->flags |= _glibtop_sysdeps_proc_time_user;
-+ }
-+
-+#else
- glibtop_suid_enter (server);
-
- if ((pinfo [0].kp_proc.p_flag & P_INMEM) &&
-@@ -199,31 +199,17 @@
- (unsigned long) &u_addr->u_stats,
- (char *) &pstats, sizeof (pstats)) == sizeof (pstats))
- {
-- /* This is taken form the kernel source code of
-- * FreeBSD 2.2.6. */
--
-- /* Well, we just do the same getrusage () does ... */
--
-- register struct rusage *rup;
-
-+ buf->utime = tv2sec (pinfo[0].kp_eproc.e_stats.p_ru.ru_utime);
-+ buf->stime = tv2sec (pinfo[0].kp_eproc.e_stats.p_ru.ru_stime);
-+ buf->cutime = tv2sec (pinfo[0].kp_eproc.e_stats.p_cru.ru_utime);
-+ buf->cstime = tv2sec (pinfo[0].kp_eproc.e_stats.p_cru.ru_stime);
-+ buf->start_time = tv2sec (pinfo[0].kp_eproc.e_stats.p_start);
-+ buf->flags |= _glibtop_sysdeps_proc_time_user;
- glibtop_suid_leave (server);
--
-- rup = &pstats.p_ru;
-- calcru(&(pinfo [0]).kp_proc,
-- &rup->ru_utime, &rup->ru_stime, NULL);
--
-- buf->utime = tv2sec (pstats.p_ru.ru_utime);
-- buf->stime = tv2sec (pstats.p_ru.ru_stime);
--
-- buf->cutime = tv2sec (pstats.p_cru.ru_utime);
-- buf->cstime = tv2sec (pstats.p_cru.ru_stime);
--
-- buf->start_time = tv2sec (pstats.p_start);
--
-- buf->flags = _glibtop_sysdeps_proc_time_user;
- }
--
- glibtop_suid_leave (server);
-+#endif
- #endif
- }
-
diff --git a/devel/libgtop2/files/patch-sysdeps::freebsd::swap.c b/devel/libgtop2/files/patch-sysdeps::freebsd::swap.c
deleted file mode 100644
index fcc281692..000000000
--- a/devel/libgtop2/files/patch-sysdeps::freebsd::swap.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- sysdeps/freebsd/swap.c.orig Tue Oct 21 18:54:25 2003
-+++ sysdeps/freebsd/swap.c Sun Feb 15 15:46:20 2004
-@@ -267,7 +267,7 @@
- /* List of swap devices and sizes. */
-
- sw_size = nswdev * sizeof (*sw);
-- sw = g_malloc (server, sw_size);
-+ sw = g_malloc (sw_size);
-
- if (kvm_read (server->machine.kd, ptr, sw, sw_size) != (ssize_t)sw_size) {
- glibtop_warn_io_r (server, "kvm_read (*swdevt)");
-@@ -399,7 +399,7 @@
- return;
- }
-
-- swaplist = g_malloc (server, nswap * sizeof (struct swapent));
-+ swaplist = g_malloc (nswap * sizeof (struct swapent));
-
- if (swapctl (SWAP_STATS, swaplist, nswap) != nswap) {
- glibtop_warn_io_r (server, "swapctl (SWAP_STATS)");
diff --git a/devel/libgtop2/files/patch-sysdeps_common_fsusage.h b/devel/libgtop2/files/patch-sysdeps_common_fsusage.h
new file mode 100644
index 000000000..bca23d9ae
--- /dev/null
+++ b/devel/libgtop2/files/patch-sysdeps_common_fsusage.h
@@ -0,0 +1,25 @@
+--- sysdeps/common/fsusage.h.orig Thu Mar 11 15:54:03 2004
++++ sysdeps/common/fsusage.h Thu Mar 11 15:56:12 2004
+@@ -20,15 +20,17 @@
+ #if !defined FSUSAGE_H_
+ # define FSUSAGE_H_
+
++#include <sys/types.h>
++
+ struct fs_usage
+ {
+ int fsu_blocksize; /* Size of a block. */
+- uintmax_t fsu_blocks; /* Total blocks. */
+- uintmax_t fsu_bfree; /* Free blocks available to superuser. */
+- uintmax_t fsu_bavail; /* Free blocks available to non-superuser. */
++ uint64_t fsu_blocks; /* Total blocks. */
++ uint64_t fsu_bfree; /* Free blocks available to superuser. */
++ uint64_t fsu_bavail; /* Free blocks available to non-superuser. */
+ int fsu_bavail_top_bit_set; /* 1 if fsu_bavail represents a value < 0. */
+- uintmax_t fsu_files; /* Total file nodes. */
+- uintmax_t fsu_ffree; /* Free file nodes. */
++ uint64_t fsu_files; /* Total file nodes. */
++ uint64_t fsu_ffree; /* Free file nodes. */
+ };
+
+ # ifndef PARAMS
diff --git a/devel/libgtop2/files/patch-sysdeps_freebsd_mem.c b/devel/libgtop2/files/patch-sysdeps_freebsd_mem.c
deleted file mode 100644
index 2aa4b7534..000000000
--- a/devel/libgtop2/files/patch-sysdeps_freebsd_mem.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- sysdeps/freebsd/mem.c.orig Tue Jan 14 17:22:18 2003
-+++ sysdeps/freebsd/mem.c Tue Jan 14 17:22:28 2003
-@@ -75,7 +75,7 @@
-
- /* MIB array for sysctl */
- static int mib_length=2;
--#ifdef __bsdi__
-+#ifndef VM_METER
- static int mib [] = { CTL_VM, VM_TOTAL };
- #else
- static int mib [] = { CTL_VM, VM_METER };
diff --git a/devel/libgtop2/files/patch-sysdeps_freebsd_netload.c b/devel/libgtop2/files/patch-sysdeps_freebsd_netload.c
deleted file mode 100644
index 0e72ddb78..000000000
--- a/devel/libgtop2/files/patch-sysdeps_freebsd_netload.c
+++ /dev/null
@@ -1,81 +0,0 @@
---- sysdeps/freebsd/netload.c.orig Mon Oct 20 01:55:32 2003
-+++ sysdeps/freebsd/netload.c Fri Nov 14 23:09:15 2003
-@@ -83,6 +83,7 @@
- u_long ifnetaddr, ifnetfound, ifaddraddr;
- struct sockaddr *sa;
- char tname [16];
-+ char temp [16];
-
- union {
- struct ifaddr ifa;
-@@ -109,10 +110,13 @@
- sizeof (ifnet)) != sizeof (ifnet))
- glibtop_error_io_r (server, "kvm_read (ifnetaddr)");
-
--#if defined(__FreeBSD__) || defined(__bsdi__)
-+#if (defined(__FreeBSD__) && (__FreeBSD_version < 501113)) || defined(__bsdi__)
- 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;
-@@ -140,39 +144,39 @@
- sin = (struct sockaddr_in *)sa;
-
- if (ifnet.if_flags & IFF_UP)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_UP;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_UP);
- if (ifnet.if_flags & IFF_BROADCAST)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_BROADCAST;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_BROADCAST);
- if (ifnet.if_flags & IFF_DEBUG)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_DEBUG;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_DEBUG);
- if (ifnet.if_flags & IFF_LOOPBACK)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_LOOPBACK;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LOOPBACK);
- if (ifnet.if_flags & IFF_POINTOPOINT)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_POINTOPOINT;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_POINTOPOINT);
- if (ifnet.if_flags & IFF_RUNNING)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_RUNNING;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_RUNNING);
- if (ifnet.if_flags & IFF_NOARP)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_NOARP;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_NOARP);
- if (ifnet.if_flags & IFF_PROMISC)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_PROMISC;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_PROMISC);
- if (ifnet.if_flags & IFF_ALLMULTI)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_ALLMULTI;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_ALLMULTI);
- if (ifnet.if_flags & IFF_OACTIVE)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_OACTIVE;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_OACTIVE);
- if (ifnet.if_flags & IFF_SIMPLEX)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_SIMPLEX;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_SIMPLEX);
- if (ifnet.if_flags & IFF_LINK0)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_LINK0;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK0);
- if (ifnet.if_flags & IFF_LINK1)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_LINK1;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK1);
- if (ifnet.if_flags & IFF_LINK2)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_LINK2;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK2);
- #ifdef __FreeBSD__
- if (ifnet.if_flags & IFF_ALTPHYS)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_ALTPHYS;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_ALTPHYS);
- #endif
- if (ifnet.if_flags & IFF_MULTICAST)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_MULTICAST;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_MULTICAST);
-
- #if !defined(__bsdi__)
- /* Commenting out to "fix" #13345. */
diff --git a/devel/libgtop2/files/patch-sysdeps_freebsd_procargs.c b/devel/libgtop2/files/patch-sysdeps_freebsd_procargs.c
deleted file mode 100644
index 5ebfdba82..000000000
--- a/devel/libgtop2/files/patch-sysdeps_freebsd_procargs.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- sysdeps/freebsd/procargs.c.orig Fri Nov 14 14:39:42 2003
-+++ sysdeps/freebsd/procargs.c Fri Nov 14 14:43:40 2003
-@@ -93,7 +93,7 @@
- size += strlen (*ptr)+1;
-
- size += 2;
-- retval = g_malloc (server, size);
-+ retval = g_malloc (size);
- memset (retval, 0, size);
-
- for (ptr = args; *ptr; ptr++) {
diff --git a/devel/libgtop2/files/patch-sysdeps_freebsd_uptime.c b/devel/libgtop2/files/patch-sysdeps_freebsd_uptime.c
new file mode 100644
index 000000000..7dbba8c37
--- /dev/null
+++ b/devel/libgtop2/files/patch-sysdeps_freebsd_uptime.c
@@ -0,0 +1,13 @@
+--- sysdeps/freebsd/uptime.c.orig Thu Mar 11 15:59:16 2004
++++ sysdeps/freebsd/uptime.c Thu Mar 11 15:59:38 2004
+@@ -68,9 +68,8 @@
+ buf->flags = _glibtop_sysdeps_uptime;
+ }
+ #else
+- buf->flags = _glibtop_sysdeps_uptime;
+-
+ glibtop_cpu cpu;
++ buf->flags = _glibtop_sysdeps_uptime;
+
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_UPTIME), 0);
+