diff options
author | sem <sem@FreeBSD.org> | 2005-10-06 18:57:46 +0800 |
---|---|---|
committer | sem <sem@FreeBSD.org> | 2005-10-06 18:57:46 +0800 |
commit | 0b05f5c632c5b761c437158895030c25e3543e1a (patch) | |
tree | 8e882d55fef8eebd397e6da545c75fe085358f83 /sysutils | |
parent | d9da7e2e1c6222dc929c578d13e98e724ab605df (diff) | |
download | freebsd-ports-gnome-0b05f5c632c5b761c437158895030c25e3543e1a.tar.gz freebsd-ports-gnome-0b05f5c632c5b761c437158895030c25e3543e1a.tar.zst freebsd-ports-gnome-0b05f5c632c5b761c437158895030c25e3543e1a.zip |
- Unbreak. Fix an ill patch.
- Bump PORTREVISION for users who install a bad version
before it was marked broken.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/and/Makefile | 10 | ||||
-rw-r--r-- | sysutils/and/files/patch-and-OpenBSD.c | 37 |
2 files changed, 16 insertions, 31 deletions
diff --git a/sysutils/and/Makefile b/sysutils/and/Makefile index 5e4ecb924016..861a6fd586ae 100644 --- a/sysutils/and/Makefile +++ b/sysutils/and/Makefile @@ -8,7 +8,7 @@ PORTNAME= and PORTVERSION= 1.0.9 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -23,10 +23,4 @@ NOPRECIOUSMAKEVARS= yes MAN5= and.conf.5 and.priorities.5 MAN8= and.8 -.include <bsd.port.pre.mk> - -.if ${OSVERSION} > 500014 -BROKEN= "Not functional due kernel changes >= 5.x" -.endif - -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/sysutils/and/files/patch-and-OpenBSD.c b/sysutils/and/files/patch-and-OpenBSD.c index d0103b0ed05f..5bb60a5c69d2 100644 --- a/sysutils/and/files/patch-and-OpenBSD.c +++ b/sysutils/and/files/patch-and-OpenBSD.c @@ -1,37 +1,28 @@ ---- and-OpenBSD.c.orig Mon Jan 28 01:02:51 2002 -+++ and-OpenBSD.c Sat Dec 21 02:04:58 2002 -@@ -91,17 +91,38 @@ +--- and-OpenBSD.c.orig Sun Jan 27 18:52:18 2002 ++++ and-OpenBSD.c Thu Oct 6 14:51:53 2005 +@@ -91,6 +91,21 @@ abort(); } if (openbsd_next >= openbsd_nproc) return NULL; ++ +#if defined(__FreeBSD__) && __FreeBSD_version >= 500014 ++ /* Skip kernel threads */ ++ while((openbsd_pt[openbsd_next].ki_flag & P_KTHREAD) ++ && openbsd_next < openbsd_nproc) ++ openbsd_next++; ++ if (openbsd_next >= openbsd_nproc) return NULL; + strncpy(openbsd_proc.command,openbsd_pt[openbsd_next].ki_comm,1023); -+#else - strncpy(openbsd_proc.command,openbsd_pt[openbsd_next].kp_proc.p_comm,1023); -+#endif - openbsd_proc.command[1023] = 0; -+#if defined(__FreeBSD__) && __FreeBSD_version >= 500014 ++ openbsd_proc.command[1023] = 0; + openbsd_proc.pid = openbsd_pt[openbsd_next].ki_pid; + openbsd_proc.nice = openbsd_pt[openbsd_next].ki_nice-20; + openbsd_proc.uid = openbsd_pt[openbsd_next].ki_ruid; + openbsd_proc.gid = openbsd_pt[openbsd_next].ki_rgid; ++ openbsd_proc.utime = (openbsd_pt[openbsd_next].ki_runtime+500000)/1000000; +#else + strncpy(openbsd_proc.command,openbsd_pt[openbsd_next].kp_proc.p_comm,1023); + openbsd_proc.command[1023] = 0; openbsd_proc.pid = openbsd_pt[openbsd_next].kp_proc.p_pid; - openbsd_proc.nice = openbsd_pt[openbsd_next].kp_proc.p_nice-20; - openbsd_proc.uid = openbsd_pt[openbsd_next].kp_eproc.e_pcred.p_ruid; - openbsd_proc.gid = openbsd_pt[openbsd_next].kp_eproc.e_pcred.p_rgid; -+#endif - /* Adapted from top(1) port, as found in the misc@openbsd.org archive */ -+#if defined(__FreeBSD__) && __FreeBSD_version >= 500014 -+ /* XXX: Accessing ki_paddr causes sig10 ... -+ openbsd_proc.utime = (openbsd_pt[openbsd_next].ki_paddr->p_uticks + -+ openbsd_pt[openbsd_next].ki_paddr->p_sticks + -+ openbsd_pt[openbsd_next].ki_paddr->p_iticks) -+ / openbsd_hz; -+ */ -+ openbsd_proc.utime = 0; -+#else - openbsd_proc.utime = (openbsd_pt[openbsd_next].kp_proc.p_uticks + +@@ -102,6 +117,7 @@ openbsd_pt[openbsd_next].kp_proc.p_sticks + openbsd_pt[openbsd_next].kp_proc.p_iticks) / openbsd_hz; |