summaryrefslogtreecommitdiff
path: root/sysutils/lavaps
diff options
context:
space:
mode:
authorhubertf <hubertf@pkgsrc.org>1999-11-02 16:18:39 +0000
committerhubertf <hubertf@pkgsrc.org>1999-11-02 16:18:39 +0000
commite9c85ea1fd18176b8f169a91d45b22ec74ea8564 (patch)
tree332d3dcba5ee69493491b4647095b2c47d9c9cc7 /sysutils/lavaps
parent29de41168bbb7b9a24908cd3e72d4c51991067e6 (diff)
downloadpkgsrc-e9c85ea1fd18176b8f169a91d45b22ec74ea8564.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