summaryrefslogtreecommitdiff
path: root/sysutils/lavaps
diff options
context:
space:
mode:
authorhubertf <hubertf>1999-11-02 16:18:39 +0000
committerhubertf <hubertf>1999-11-02 16:18:39 +0000
commit8ae99cbc282bd9a65007d867ab71036191017304 (patch)
tree332d3dcba5ee69493491b4647095b2c47d9c9cc7 /sysutils/lavaps
parent0d1956bd4d9324039e98d3b1e0e046a32de33030 (diff)
downloadpkgsrc-8ae99cbc282bd9a65007d867ab71036191017304.tar.gz
On ports that don't define UPAGES, calculate it from USPACE and
the port's pagesize. Thanks to Chris Demetriou for his help! Fixes PR 8728 by Dan McMahill <mcmahill@mtl.mit.edu>
Diffstat (limited to 'sysutils/lavaps')
-rw-r--r--sysutils/lavaps/files/patch-sum3
-rw-r--r--sysutils/lavaps/patches/patch-aa28
2 files changed, 31 insertions, 0 deletions
diff --git a/sysutils/lavaps/files/patch-sum b/sysutils/lavaps/files/patch-sum
new file mode 100644
index 00000000000..1ca758448af
--- /dev/null
+++ b/sysutils/lavaps/files/patch-sum
@@ -0,0 +1,3 @@
+$NetBSD: patch-sum,v 1.1 1999/11/02 16:18:39 hubertf Exp $
+
+MD5 (patch-aa) = 7134b5196ea1210ddd57798077063e07
diff --git a/sysutils/lavaps/patches/patch-aa b/sysutils/lavaps/patches/patch-aa
new file mode 100644
index 00000000000..e9423263f8e
--- /dev/null
+++ b/sysutils/lavaps/patches/patch-aa
@@ -0,0 +1,28 @@
+--- process_scan_freebsd.cc.orig Tue Nov 2 16:27:39 1999
++++ process_scan_freebsd.cc Tue Nov 2 16:53:24 1999
+@@ -112,7 +112,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;
+ }
+
+@@ -246,6 +246,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