From f674574cd060772175aae063e553460638971601 Mon Sep 17 00:00:00 2001 From: seb Date: Sun, 28 Dec 2008 22:38:08 +0000 Subject: Fix build on NetBSD 3.x: do not use NetBSD's cpp macro __NetBSD_Prereq__, at least not directly, to check for NetBSD version 4.99.44 and onward. --- sysutils/monit/distinfo | 4 ++-- sysutils/monit/patches/patch-ab | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'sysutils') diff --git a/sysutils/monit/distinfo b/sysutils/monit/distinfo index 261903c310b..91b76ac355e 100644 --- a/sysutils/monit/distinfo +++ b/sysutils/monit/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.3 2008/10/08 15:53:42 joerg Exp $ +$NetBSD: distinfo,v 1.4 2008/12/28 22:38:08 seb Exp $ SHA1 (monit-4.10.1.tar.gz) = c87aa0c6e0b1d13f46b7e9d84937191e25a907a6 RMD160 (monit-4.10.1.tar.gz) = 6c517b19bc43f4023dfca4de1df09272b41af02d Size (monit-4.10.1.tar.gz) = 606273 bytes SHA1 (patch-aa) = b51792edf22fb9867d45a4adb2aadd03dbe5467c -SHA1 (patch-ab) = c661d0d9a8bfbabb2e7964eec54204e46b15f620 +SHA1 (patch-ab) = f691fd49a7c8150096a0a3fb4fb8ae72bf38d547 diff --git a/sysutils/monit/patches/patch-ab b/sysutils/monit/patches/patch-ab index b92e9d61023..0fbcf243ca0 100644 --- a/sysutils/monit/patches/patch-ab +++ b/sysutils/monit/patches/patch-ab @@ -1,4 +1,4 @@ -$NetBSD: patch-ab,v 1.3 2008/10/08 15:53:42 joerg Exp $ +$NetBSD: patch-ab,v 1.4 2008/12/28 22:38:08 seb Exp $ --- process/sysdep_NETBSD.c.orig 2007-07-29 20:23:26.000000000 +0000 +++ process/sysdep_NETBSD.c @@ -11,14 +11,11 @@ $NetBSD: patch-ab,v 1.3 2008/10/08 15:53:42 joerg Exp $ #include "monitor.h" #include "process.h" #include "process_sysdep.h" -@@ -171,9 +173,18 @@ int initprocesstree_sysdep(ProcessTree_T +@@ -171,9 +173,15 @@ int initprocesstree_sysdep(ProcessTree_T { pt[i].pid = pinfo[i].kp_proc.p_pid; pt[i].ppid = pinfo[i].kp_eproc.e_ppid; -+#ifndef __NetBSD_Prereq__ -+#define __NetBSD_Prereq__(a,b,c) 0 -+#endif -+#if __NetBSD_Prereq__(4,99,44) ++#if defined(__NetBSD_Prereq__) && (499004400 <= __NetBSD_Version__) + pt[i].cputime = (long)((pinfo[i].kp_proc.p_rtime.sec << 4) + + (pinfo[i].kp_proc.p_rtime.frac >> 60) + ); -- cgit v1.2.3