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
27
28
29
30
31
32
33
34
35
36
|
--- sysdeps/freebsd/procmap.c.orig 2008-05-23 18:13:23.000000000 -0400
+++ sysdeps/freebsd/procmap.c 2008-08-02 19:03:51.000000000 -0400
@@ -41,7 +41,17 @@
#define _KERNEL
#include <sys/pipe.h>
#include <sys/conf.h>
+#undef _KERNEL
+#if __FreeBSD_version >= 800038
+#define _WANT_FILE
#include <sys/file.h>
+#undef _WANT_FILE
+#else
+#define _KERNEL
+#include <sys/file.h>
+#undef _KERNEL
+#endif
+#define _KERNEL
#include <sys/mount.h>
#include <ufs/ufs/quota.h>
#include <ufs/ufs/inode.h>
@@ -103,8 +113,14 @@ _glibtop_sysdeps_freebsd_dev_inode (glib
if (kvm_read (server->machine.kd, (gulong) inode.i_dev, (char *) &si,
sizeof (si)) != sizeof (si) ||
+#if __FreeBSD_version >= 800039
+ kvm_read (server->machine.kd, (gulong) cdev2priv(&si), (char *) &priv,
+ sizeof (priv))
+#else
kvm_read (server->machine.kd, (gulong) si.si_priv, (char *) &priv,
- sizeof (priv)) != sizeof (priv))
+ sizeof (priv))
+#endif
+ != sizeof (priv))
{
glibtop_warn_io_r (server, "kvm_read (si)");
return;
|