From 0064f34ace25f1da73dc1f519643029c0bc511b8 Mon Sep 17 00:00:00 2001 From: naddy Date: Thu, 15 Mar 2007 18:15:12 +0000 Subject: [PATCH] LP64 fix; problem reported by Bryan Irvine --- sysutils/whowatch/Makefile | 3 +- sysutils/whowatch/distinfo | 1 + sysutils/whowatch/patches/patch-procinfo_c | 32 ++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 sysutils/whowatch/patches/patch-procinfo_c diff --git a/sysutils/whowatch/Makefile b/sysutils/whowatch/Makefile index 6727d0ac4ec..24503a4b8cd 100644 --- a/sysutils/whowatch/Makefile +++ b/sysutils/whowatch/Makefile @@ -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/ diff --git a/sysutils/whowatch/distinfo b/sysutils/whowatch/distinfo index bc90909d61a..9728107d040 100644 --- a/sysutils/whowatch/distinfo +++ b/sysutils/whowatch/distinfo @@ -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 diff --git a/sysutils/whowatch/patches/patch-procinfo_c b/sysutils/whowatch/patches/patch-procinfo_c new file mode 100644 index 00000000000..3b8684864c8 --- /dev/null +++ b/sysutils/whowatch/patches/patch-procinfo_c @@ -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;