Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Oct 2000 09:40:30 +0100 (BST)
From:      m.seaman@inpharmatica.co.uk
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/22144: [PATCH] rawio patch-ac logic broken
Message-ID:  <200010200840.e9K8eUZ01823@marylebone.inpharmatica.co.uk>

next in thread | raw e-mail | index | archive | help

>Number:         22144
>Category:       ports
>Synopsis:       patch-ac of rawio port prevents compilation on FreeBSD/i386
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 20 01:50:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Matthew Seaman
>Release:        FreeBSD 4.1.1-STABLE i386
>Organization:
Inpharmatica Ltd
>Environment:

marylebone:...benchmarks/rawio/files:% uname -a 
FreeBSD marylebone.inpharmatica.co.uk 4.1.1-STABLE FreeBSD 4.1.1-STABLE #0: Thu Oct 19 16:22:48 BST 2000     root@marylebone.inpharmatica.co.uk:/usr/src/sys/compile/MARYLEBONE  i386

ports cvsup'd on 18th October

>Description:

Patch-ac of the rawio port attempts to alter the file mkrandom.c in
the rawio source to conditionally prevent inclusion of
<machine/random.h> (which is not present in FreeBSD/i386) based on the
definition of the __FreeBSD__ and __alpha__ CPP macros.  However, as
coded, <machine/random.h> would still be #include'd on FreeBSD/i386:

#if !defined(__FreeBSD__) || !defined(__alpha__)
#include <machine/random.h>
#endif

I think that `||' should probably be an `&&'

>How-To-Repeat:

	% cd /usr/ports/benchmarks/rawio
	% make

>Fix:

Replace patch-ac with this:

--- mkrandom.c.orig     Sat Jan  1 19:47:33 2000
+++ mkrandom.c  Thu Jan 27 21:32:52 2000
@@ -54,7 +54,9 @@
 #include <sys/wait.h>
 #include <sys/resource.h>
 #include <signal.h>
-#include "random.h"
+#if !defined(__FreeBSD__) && !defined(__alpha__)
+#include <machine/random.h>
+#endif
 
 /* submitted by Andy Doran <ad@psn.ie> */
 #ifdef __NetBSD__



>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200010200840.e9K8eUZ01823>