d962a2a9ce
from Moritz Grimm <mlist at scapa.dnsalias.net> ok espie@
72 lines
2.5 KiB
Plaintext
72 lines
2.5 KiB
Plaintext
$OpenBSD: patch-sysdeps_freebsd_procmap_c,v 1.6 2007/02/21 17:27:54 steven Exp $
|
|
--- sysdeps/freebsd/procmap.c.orig Tue Jan 2 23:50:28 2007
|
|
+++ sysdeps/freebsd/procmap.c Sun Feb 18 20:23:18 2007
|
|
@@ -36,7 +36,7 @@
|
|
#include <vm/vm_object.h>
|
|
#include <vm/vm_prot.h>
|
|
#include <vm/vm_map.h>
|
|
-#elif defined(__NetBSD__) && (__NetBSD_Version__ >= 105020000)
|
|
+#elif defined(__NetBSD__) && (__NetBSD_Version__ >= 105020000) || defined(__OpenBSD__)
|
|
#include <uvm/uvm_extern.h>
|
|
#else
|
|
#include <vm/vm_object.h>
|
|
@@ -64,11 +64,11 @@
|
|
#include <sys/user.h>
|
|
#endif
|
|
#include <sys/sysctl.h>
|
|
-#if !defined(__NetBSD__) || (__NetBSD_Version__ < 105020000)
|
|
+#if (!defined(__NetBSD__) || (__NetBSD_Version__ < 105020000)) && ! defined(__OpenBSD__)
|
|
#include <vm/vm.h>
|
|
#endif
|
|
|
|
-#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
|
|
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) || defined(__OpenBSD__)
|
|
/* Fixme ... */
|
|
#undef _KERNEL
|
|
#define _UVM_UVM_AMAP_I_H_ 1
|
|
@@ -102,7 +102,7 @@ glibtop_get_proc_map_p (glibtop *server,
|
|
struct kinfo_proc *pinfo;
|
|
struct vm_map_entry entry, *first;
|
|
struct vmspace vmspace;
|
|
-#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
|
|
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) || defined(OpenBSD)
|
|
struct vnode vnode;
|
|
struct inode inode;
|
|
#else
|
|
@@ -167,7 +167,7 @@ glibtop_get_proc_map_p (glibtop *server,
|
|
|
|
/* I tested this a few times with `mmap'; as soon as you write
|
|
* to the mmap'ed area, the object type changes from OBJT_VNODE
|
|
- * to OBJT_DEFAULT so if seems this really works. */
|
|
+ * to OBJT_DEFAULT so it seems this really works. */
|
|
|
|
do {
|
|
if (update) {
|
|
@@ -188,7 +188,7 @@ glibtop_get_proc_map_p (glibtop *server,
|
|
continue;
|
|
#endif
|
|
#else
|
|
-#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
|
|
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) || defined(__OpenBSD__)
|
|
if (UVM_ET_ISSUBMAP (&entry))
|
|
continue;
|
|
#else
|
|
@@ -214,7 +214,7 @@ glibtop_get_proc_map_p (glibtop *server,
|
|
|
|
i++;
|
|
|
|
-#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
|
|
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) || defined(OpenBSD)
|
|
if (!entry.object.uvm_obj)
|
|
continue;
|
|
|
|
@@ -238,7 +238,7 @@ glibtop_get_proc_map_p (glibtop *server,
|
|
glibtop_error_io_r (server, "kvm_read (object)");
|
|
#endif
|
|
|
|
-#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
|
|
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) || defined(OpenBSD)
|
|
#if defined(UVM_VNODE_VALID)
|
|
if (!vnode.v_uvm.u_flags & UVM_VNODE_VALID)
|
|
continue;
|