summaryrefslogtreecommitdiff
path: root/net/net-snmp/patches/patch-am
blob: ada7cab7d842fd80acb74de3546519b5453d80e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$NetBSD: patch-am,v 1.5 2006/07/29 16:48:27 adam Exp $

--- agent/mibgroup/host/hr_swrun.c.orig	2006-06-01 15:29:13.000000000 +0200
+++ agent/mibgroup/host/hr_swrun.c
@@ -896,6 +896,8 @@ var_hrswrun(struct variable * vp,
 	else
 	    long_return = 4;	/* application */
     #endif
+#elif defined darwin
+	long_return = -1;
 #else
 	long_return = 4;	/* application */
 #endif
@@ -1037,6 +1039,10 @@ var_hrswrun(struct variable * vp,
         long_return = 0;
     #elif defined(freebsd5)
         long_return = proc_table[LowProcIndex].ki_runtime / 100000;
+    #elif defined(dragonfly)
+        long_return = proc_table[LowProcIndex].kp_eproc.e_uticks +
+            proc_table[LowProcIndex].kp_eproc.e_sticks +
+            proc_table[LowProcIndex].kp_eproc.e_iticks;
     #else
         long_return = proc_table[LowProcIndex].kp_proc.p_uticks +
             proc_table[LowProcIndex].kp_proc.p_sticks +