Fix build on sparc - do not use ctob macro that should not be used in
userland (and breaks build on sparc) instead use sysconf(3) to get page size. lead to the right direction by naddy & miod - thanks Problem reported by John Pavlakis <xyloplax@yahoo.com>
This commit is contained in:
parent
cb0a77dd4e
commit
f6b98261b3
22
sysutils/lsof/patches/patch-dialects_n+obsd_dnode_c
Normal file
22
sysutils/lsof/patches/patch-dialects_n+obsd_dnode_c
Normal file
@ -0,0 +1,22 @@
|
||||
$OpenBSD: patch-dialects_n+obsd_dnode_c,v 1.1 2003/05/13 04:09:13 pvalchev Exp $
|
||||
--- dialects/n+obsd/dnode.c.orig Mon May 12 19:05:44 2003
|
||||
+++ dialects/n+obsd/dnode.c Mon May 12 19:11:40 2003
|
||||
@@ -37,6 +37,7 @@ static char *rcsid = "$Id: dnode.c,v 1.2
|
||||
|
||||
|
||||
#include "lsof.h"
|
||||
+#include <unistd.h>
|
||||
|
||||
|
||||
#if defined(HASFDESCFS) && HASFDESCFS==1
|
||||
@@ -68,8 +69,8 @@ getmemsz(pid)
|
||||
if (!p->P_VMSPACE
|
||||
|| kread((KA_T)p->P_VMSPACE, (char *)&vm, sizeof(vm)))
|
||||
return;
|
||||
- Lf->sz = (SZOFFTYPE)ctob(vm.vm_tsize + vm.vm_dsize
|
||||
- + vm.vm_ssize);
|
||||
+ Lf->sz = (SZOFFTYPE)((vm.vm_tsize + vm.vm_dsize
|
||||
+ + vm.vm_ssize) * sysconf(_SC_PAGESIZE));
|
||||
Lf->sz_def = 1;
|
||||
return;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user