LP64 fix; problem reported by Bryan Irvine
This commit is contained in:
parent
2c2c250df3
commit
0064f34ace
@ -1,8 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.9 2005/02/07 19:01:50 pvalchev Exp $
|
||||
# $OpenBSD: Makefile,v 1.10 2007/03/15 18:15:12 naddy Exp $
|
||||
|
||||
COMMENT= "interactive utility that displays info about online users"
|
||||
|
||||
DISTNAME= whowatch-1.4
|
||||
PKGNAME= ${DISTNAME}p0
|
||||
CATEGORIES= sysutils
|
||||
|
||||
HOMEPAGE= http://wizard.ae.krakow.pl/~mike/
|
||||
|
@ -1,4 +1,5 @@
|
||||
MD5 (whowatch-1.4.tar.gz) = 0870155e8b75b99f9954e76fb20f9528
|
||||
RMD160 (whowatch-1.4.tar.gz) = da2ee1d52e2a1d5292713259e66b4e7dd39b8dfd
|
||||
SHA1 (whowatch-1.4.tar.gz) = 0d60c8ddb56b9bf9d2f3e1452832ccb2c862ff0c
|
||||
SHA256 (whowatch-1.4.tar.gz) = 221564dbdf503990e6e14803a1df0c735c61fa6069ebc56a57a8fba9ac22e4f4
|
||||
SIZE (whowatch-1.4.tar.gz) = 43084
|
||||
|
32
sysutils/whowatch/patches/patch-procinfo_c
Normal file
32
sysutils/whowatch/patches/patch-procinfo_c
Normal file
@ -0,0 +1,32 @@
|
||||
$OpenBSD: patch-procinfo_c,v 1.1 2007/03/15 18:15:12 naddy Exp $
|
||||
--- procinfo.c.orig Sat Mar 10 01:18:23 2007
|
||||
+++ procinfo.c Sat Mar 10 01:20:12 2007
|
||||
@@ -65,7 +65,7 @@ void get_info(int pid, struct procinfo *
|
||||
int fill_kinfo(struct kinfo_proc *info, int pid)
|
||||
{
|
||||
int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid };
|
||||
- int len = sizeof *info;
|
||||
+ size_t len = sizeof *info;
|
||||
if(sysctl(mib, 4, info, &len, 0, 0) == -1)
|
||||
return -1;
|
||||
return len?0:-1;
|
||||
@@ -124,7 +124,8 @@ int get_term(char *tty)
|
||||
int get_login_pid(char *tty)
|
||||
{
|
||||
int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_TTY, 0};
|
||||
- int len, t, el, i, pid, cndt = -1, l;
|
||||
+ int t, el, i, pid, cndt = -1, l;
|
||||
+ size_t len;
|
||||
struct kinfo_proc *info;
|
||||
struct procinfo p;
|
||||
|
||||
@@ -169,7 +170,8 @@ int get_login_pid(char *tty)
|
||||
int get_all_info(struct kinfo_proc **info)
|
||||
{
|
||||
int mib[3] = { CTL_KERN, KERN_PROC, KERN_PROC_ALL };
|
||||
- int len, el;
|
||||
+ int el;
|
||||
+ size_t len;
|
||||
|
||||
if(sysctl(mib, 3, 0, &len, 0, 0) == -1)
|
||||
return 0;
|
Loading…
Reference in New Issue
Block a user