$NetBSD: patch-aa,v 1.3 2000/10/15 02:33:15 jlam Exp $ --- process_scan_freebsd.cc.orig Tue Jun 6 16:25:25 2000 +++ process_scan_freebsd.cc Wed Sep 6 05:16:59 2000 @@ -39,6 +39,7 @@ #include #include #include +#include } #include "process_scan.hh" @@ -116,7 +117,7 @@ ENTRY_TRACE(__FILE__,__LINE__); static int pages_per_kb = 0; if (!pages_per_kb) - pages_per_kb = getpagesize() / 1024; + pages_per_kb = sysconf(_SC_PAGESIZE) / 1024; return pages * pages_per_kb; } @@ -250,6 +251,16 @@ // xxx: skip p_iticks int size, resident; + +#ifdef __NetBSD__ +# ifndef UPAGES +# ifdef USPACE +# define UPAGES ( USPACE / sysconf(_SC_PAGESIZE) ) +# else /* !USPACE */ +# error No UPAGES, no USPACE, no fun! +# endif /* USPACE */ +# endif /* !UPAGES */ +#endif /* __NetBSD__ */ #if __FreeBSD__ < 3 size = UPAGES + cur_kp_->kp_eproc.e_vm.vm_tsize