blob: d4625a38d0693f89ed6946e0e1913a93c5dd9cb4 (
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
25
26
|
$NetBSD: patch-ad,v 1.2 2005/12/12 00:11:52 joerg Exp $
--- src/cpu_perc.c.orig 2002-05-07 02:50:10.000000000 +0000
+++ src/cpu_perc.c
@@ -45,6 +45,9 @@
#include <fcntl.h>
#include <sys/mount.h>
#endif
+#ifdef HAVE_SYS_STATVFS_H
+#include <sys/statvfs.h>
+#endif
gfloat check_child_cpu_usage(int childs_pid)
{
@@ -66,7 +69,11 @@ gfloat check_child_cpu_usage(int childs_
/* find where the proc fs is mounted, some strange people could mount it
in another place than /proc, it can even be not mounted at all */
{
+#if defined(HAVE_SYS_STATVFS_H) && !defined(__DragonFly__)
+ struct statvfs *mntbufp;
+#else
struct statfs *mntbufp;
+#endif
int fs_count;
int procfs_found = 0;
|