ports/88319: fix benchmarks/rawio for RELENG_4
Dmitry Morozovsky
marck at FreeBSD.org
Tue Nov 1 11:40:18 UTC 2005
>Number: 88319
>Category: ports
>Synopsis: fix benchmarks/rawio for RELENG_4
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Nov 01 11:40:15 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Dmitry Morozovsky
>Release: FreeBSD 4-STABLE i386
>Organization:
Cronyx Plus LLC (RiNet ISP)
>Environment:
System: FreeBSD 4-STABLE
>Description:
After GEOMization rawio fails to build on pre-GEOM FreeBSD, such as RELENG_4.
>How-To-Repeat:
on RELEMG_4:
> cd /usr/ports/benchmarks/rawio
> make
In file included from rawio.c:61:
/usr/include/sys/disk.h:31: syntax error before `LIST_ENTRY'
*** Error code 1
>Fix:
Simple:
Index: files/patch-ad
===================================================================
RCS file: /home/ncvs/ports/benchmarks/rawio/files/patch-ad,v
retrieving revision 1.3
diff -u -r1.3 patch-ad
--- files/patch-ad 26 Oct 2005 18:40:43 -0000 1.3
+++ files/patch-ad 1 Nov 2005 11:28:17 -0000
@@ -1,14 +1,19 @@
---- rawio.c.orig Sun Nov 26 22:28:19 2000
-+++ rawio.c Wed Oct 26 14:07:30 2005
-@@ -58,6 +58,7 @@
+
+$FreeBSD$
+
+--- rawio.c.orig
++++ rawio.c
+@@ -57,7 +57,9 @@
+ #include <sys/ioctl.h>
#endif
#ifdef BSD4_4
++#include <sys/queue.h>
#include <sys/disklabel.h>
+#include <sys/disk.h>
#endif
#include "randoms.h"
-@@ -99,6 +100,7 @@
+@@ -99,6 +101,7 @@
char *buf; /* and what we're using, for alignment */
int file;
size_t length;
@@ -16,7 +21,7 @@
int count;
enum operation
-@@ -331,13 +333,7 @@
+@@ -331,13 +334,7 @@
maxchunk = (size_t) atoi (arg);
if (maxchunk < (size_t) 512)
{
@@ -31,7 +36,7 @@
}
if (maxchunk > (size_t) MAXPHYS)
{
-@@ -423,7 +419,7 @@
+@@ -423,7 +420,7 @@
printf ("No arg to n flag\n");
break;
}
@@ -40,7 +45,7 @@
break;
case 'S':
-@@ -500,11 +496,6 @@
+@@ -500,11 +497,6 @@
buf = (char *) (((int) &physbuf [MAXPHYS]) & ~ (alignment - 1)); /* where to put the aligned buffer */
if (op == 0) /* no ops specified, */
op = RandomRead | SequentialRead; /* default to the read tests */
@@ -52,7 +57,7 @@
if (device == NULL)
{
fprintf (stderr, "No file name specified\n");
-@@ -565,6 +556,27 @@
+@@ -565,6 +557,27 @@
fprintf (stderr, "No file size specified\n");
usage ();
}
@@ -80,7 +85,7 @@
if (id == NULL) /* no ID specified, */
{
id = strrchr (device, '/'); /* find the basename */
-@@ -580,7 +592,11 @@
+@@ -580,7 +593,11 @@
childinfo = mmap (NULL,
nproc * sizeof (struct childinfo),
PROT_READ | PROT_WRITE,
@@ -92,7 +97,7 @@
-1,
(off_t) 0 );
#else
-@@ -835,14 +851,6 @@
+@@ -835,14 +852,6 @@
childinfo [proc].writes = 0;
childinfo [proc].bytes_written = 0;
@@ -107,7 +112,7 @@
/* Don't jump the gun */
sigemptyset (&allsigs);
if (sigaction (SIGUSR1, &ignore, NULL) < 0)
-@@ -863,20 +871,13 @@
+@@ -863,20 +872,13 @@
length = maxchunk;
else
length = (myrandom (proc + nproc * i * 2)
@@ -133,7 +138,7 @@
fprintf (stderr,
"offset %" Quad "d, filesize %" Quad "d\n",
-@@ -915,9 +916,9 @@
+@@ -915,9 +917,9 @@
if (fixedoffset)
offset = SKIPSTART; /* start at the beginning */
else /* random start */
@@ -145,7 +150,7 @@
if ((offset + maxrecs * length) > filesize) /* XXX */
{
printf ("Overrun: offset %" Quad "d, end %" Quad "d, file size %" Quad "d\n",
-@@ -928,18 +929,12 @@
+@@ -928,18 +930,12 @@
}
if ((verbose > 2) && ! fixedoffset)
printf ("Child %d reading from %" Quad "d\n", proc, offset);
@@ -166,7 +171,7 @@
fprintf (stderr,
"offset %" Quad "d, filesize %" Quad "d\n",
-@@ -976,30 +971,28 @@
+@@ -976,30 +972,28 @@
length = maxchunk;
else
length = (myrandom (proc + nproc * i * 2)
@@ -204,7 +209,7 @@
fprintf (stderr,
"offset %" Quad "d, filesize %" Quad "d\n", offset,
-@@ -1032,36 +1025,30 @@
+@@ -1032,36 +1026,30 @@
if (fixedoffset)
offset = SKIPSTART; /* start at the beginning */
else /* random start */
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list