diff options
Diffstat (limited to 'sysutils/torsmo/patches')
-rw-r--r-- | sysutils/torsmo/patches/patch-ad | 36 | ||||
-rw-r--r-- | sysutils/torsmo/patches/patch-ae | 53 |
2 files changed, 84 insertions, 5 deletions
diff --git a/sysutils/torsmo/patches/patch-ad b/sysutils/torsmo/patches/patch-ad index 09d0f0ba05a..44e7440462a 100644 --- a/sysutils/torsmo/patches/patch-ad +++ b/sysutils/torsmo/patches/patch-ad @@ -1,8 +1,34 @@ -$NetBSD: patch-ad,v 1.1 2006/10/05 02:53:55 rillig Exp $ +$NetBSD: patch-ad,v 1.2 2007/02/19 19:50:48 joerg Exp $ ---- configure.orig 2006-10-05 04:52:34.000000000 +0200 -+++ configure 2006-10-05 04:53:06.000000000 +0200 -@@ -924,14 +924,14 @@ fi +--- configure.orig 2004-12-21 21:57:05.000000000 +0000 ++++ configure +@@ -795,11 +795,15 @@ fi + + uname=`uname` + ++if test "$uname" = "DragonFly"; then ++ LIBS="$LIBS -lkinfo" ++fi ++ + case $uname in + Linux*) + WANT_SYSINFO=yes + ;; +- FreeBSD*) ++ FreeBSD*|DragonFly*) + WANT_KVM=yes + ;; + NetBSD*) +@@ -839,7 +843,7 @@ else + fi + + +-if test x$uname = xFreeBSD; then ++if test x$uname = xFreeBSD || test x$uname = xDragonFly; then + BUILD_FREEBSD_TRUE= + BUILD_FREEBSD_FALSE='#' + else +@@ -924,14 +928,14 @@ fi @@ -19,7 +45,7 @@ $NetBSD: patch-ad,v 1.1 2006/10/05 02:53:55 rillig Exp $ cat >> confdefs.h <<\EOF #define SETI 1 EOF -@@ -949,14 +949,14 @@ fi +@@ -949,14 +953,14 @@ fi diff --git a/sysutils/torsmo/patches/patch-ae b/sysutils/torsmo/patches/patch-ae new file mode 100644 index 00000000000..d7fb46472b5 --- /dev/null +++ b/sysutils/torsmo/patches/patch-ae @@ -0,0 +1,53 @@ +$NetBSD: patch-ae,v 1.1 2007/02/19 19:50:48 joerg Exp $ + +--- freebsd.c.orig 2007-02-19 19:26:16.000000000 +0000 ++++ freebsd.c +@@ -13,7 +13,11 @@ + #include <sys/types.h> + #include <sys/time.h> + #include <sys/vmmeter.h> ++#ifdef __DragonFly__ ++#include <kinfo.h> ++#else + #include <sys/dkstat.h> ++#endif + #include <unistd.h> + #include <sys/user.h> + #include <sys/socket.h> +@@ -251,6 +255,19 @@ long cpu_used, oldtotal, oldused; + + void update_cpu_usage() { + long used, total; ++#ifdef __DragonFly__ ++ struct kinfo_cputime cp_time; ++ ++ if (kinfo_get_sched_cputime(&cp_time)) { ++ fprintf(stderr, "kinfo_get_sched_cputime failed"); ++ return; ++ } ++ fresh.load[0] = cp_time.cp_user; ++ fresh.load[0] = cp_time.cp_nice; ++ fresh.load[0] = cp_time.cp_sys; ++ fresh.load[0] = cp_time.cp_idle; ++ fresh.load[0] = cp_time.cp_idle; ++#else + long cp_time[CPUSTATES]; + size_t len = sizeof(cp_time); + +@@ -263,6 +280,7 @@ void update_cpu_usage() { + fresh.load[2] = cp_time[CP_SYS]; + fresh.load[3] = cp_time[CP_IDLE]; + fresh.load[4] = cp_time[CP_IDLE]; ++#endif + + used = fresh.load[0] + fresh.load[1] + fresh.load[2]; + total = fresh.load[0] + fresh.load[1] + fresh.load[2] + fresh.load[3]; +@@ -345,3 +363,8 @@ char* get_acpi_ac_adapter(void) + char* get_acpi_fan() { + return ""; + } ++ ++char * get_freq() ++{ ++ return ""; ++} |