Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jul 2007 18:00:40 +0200
From:      Max Laier <max@love2party.net>
To:        freebsd-ports@freebsd.org
Subject:   Re: [Fwd: pfstat-2.2_3 failed on amd64 7]
Message-ID:  <200707141800.58406.max@love2party.net>
In-Reply-To: <1184417594.13302.63.camel@ikaros.oook.cz>
References:  <1184417594.13302.63.camel@ikaros.oook.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart1264277.4ZZ7psZxiN
Content-Type: multipart/mixed;
  boundary="Boundary-01=_vMPmGP2yavb+Bfl"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--Boundary-01=_vMPmGP2yavb+Bfl
Content-Type: text/plain;
  charset="iso-8859-6"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Saturday 14 July 2007, Pav Lucistnik wrote:
> > building pfstat-2.2_3 on hammer3.isc.gumbysoft.com
=2E..
> > cc -O1 -pipe   -Wall -I/usr/local/include
> > -I/work/a/ports/sysutils/pfstat/work/pfstat-2.2  -c pf.c
> > pf.c: In function 'query_ifaces':
> > pf.c:145: error: array type has incomplete element type
> > pf.c:152: error: 'PFI_FLAG_ALLMASK' undeclared (first use in this
> > function)
> > pf.c:152: error: (Each undeclared identifier is reported only once
> > pf.c:152: error: for each function it appears in.)=20
> > pf.c:145: warning: unused variable 'ifs'
> > *** Error code 1
> >
> > Stop in /work/a/ports/sysutils/pfstat/work/pfstat-2.2.
> > *** Error code 1
> >
> > Stop in /a/ports/sysutils/pfstat.
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > build of /usr/ports/sysutils/pfstat ended at Sat Jul 14 02:37:11 UTC
> > 2007

=46ix attached - could somebody please add required ports-foo and commit? =
=20
Thanks!  Note that this adds a new file "pre41-patch-pf.c"

=2D-=20
/"\  Best regards,                      | mlaier@freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier@EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News

--Boundary-01=_vMPmGP2yavb+Bfl
Content-Type: text/x-diff;
  charset="iso-8859-6";
  name="pfstat.41.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="pfstat.41.diff"

Index: Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /usr/store/mlaier/fcvs/ports/sysutils/pfstat/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
=2D-- Makefile	19 May 2007 20:23:30 -0000	1.11
+++ Makefile	14 Jul 2007 15:59:40 -0000
@@ -38,6 +38,9 @@
 		${WRKSRC}/Makefile
 	@${REINPLACE_CMD} -e "s|/etc/|${PREFIX}/etc/|" \
 		${WRKSRC}/pfstat.[c8]
+.if ${OSVERSION} < 700048
+	@${PATCH} ${WRKSRC}/pf.c ${PATCHDIR}/pre41-patch-pf.c
+.endif
=20
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/pfstat ${PREFIX}/bin
Index: files/patch-pf.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /usr/store/mlaier/fcvs/ports/sysutils/pfstat/files/patch-pf.c,v
retrieving revision 1.2
diff -u -r1.2 patch-pf.c
=2D-- files/patch-pf.c	16 Dec 2006 01:58:38 -0000	1.2
+++ files/patch-pf.c	14 Jul 2007 15:53:34 -0000
@@ -13,32 +13,3 @@
  	mnr =3D pa.nr;
 =20
  	/* fetch each of those queues */
=2D@@ -144,23 +142,24 @@
=2D query_ifaces(int fd, void (*cb)(int, const char *, int, double))
=2D {
=2D 	struct pfioc_iface io;
=2D-	struct pfi_kif ifs[256];
=2D+	struct pfi_if ifs[256];
=2D 	int i, j;
=2D=20
=2D 	memset(&io, 0, sizeof(io));
=2D 	io.pfiio_buffer =3D ifs;
=2D 	io.pfiio_esize =3D sizeof(ifs[0]);
=2D 	io.pfiio_size =3D sizeof(ifs) / sizeof(ifs[0]);
=2D+	io.pfiio_flags =3D PFI_FLAG_ALLMASK;
=2D 	if (ioctl(fd, DIOCIGETIFACES, &io)) {
=2D 		fprintf(stderr, "ioctl: DIOCIGETIFACES: %s\n", strerror(errno));
=2D 		return (1);
=2D 	}
=2D 	for (i =3D 0; i < io.pfiio_size; ++i)
=2D 		for (j =3D 0; j < 16; ++j)
=2D-			(*cb)(COL_TYPE_IFACE, ifs[i].pfik_name,
=2D+			(*cb)(COL_TYPE_IFACE, ifs[i].pfif_name,
=2D 			    j, j & 4 ?
=2D-			    ifs[i].pfik_packets[j&1?0:1][j&2?0:1][j&8?0:1] :
=2D-			    ifs[i].pfik_bytes[j&1?0:1][j&2?0:1][j&8?0:1]);
=2D+			    ifs[i].pfif_packets[j&1?0:1][j&2?0:1][j&8?0:1] :
=2D+			    ifs[i].pfif_bytes[j&1?0:1][j&2?0:1][j&8?0:1]);
=2D 	/* bytes/packets[af][dir][op] */
=2D 	return (0);
=2D }
Index: files/pre41-patch-pf.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: files/pre41-patch-pf.c
diff -N files/pre41-patch-pf.c
=2D-- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/pre41-patch-pf.c	14 Jul 2007 15:53:34 -0000
@@ -0,0 +1,31 @@
+--- pf.c.orig	Thu May 11 23:41:07 2006
++++ pf.c	Mon Dec 11 21:08:31 2006
+@@ -144,23 +142,24 @@
+ query_ifaces(int fd, void (*cb)(int, const char *, int, double))
+ {
+ 	struct pfioc_iface io;
+-	struct pfi_kif ifs[256];
++	struct pfi_if ifs[256];
+ 	int i, j;
+=20
+ 	memset(&io, 0, sizeof(io));
+ 	io.pfiio_buffer =3D ifs;
+ 	io.pfiio_esize =3D sizeof(ifs[0]);
+ 	io.pfiio_size =3D sizeof(ifs) / sizeof(ifs[0]);
++	io.pfiio_flags =3D PFI_FLAG_ALLMASK;
+ 	if (ioctl(fd, DIOCIGETIFACES, &io)) {
+ 		fprintf(stderr, "ioctl: DIOCIGETIFACES: %s\n", strerror(errno));
+ 		return (1);
+ 	}
+ 	for (i =3D 0; i < io.pfiio_size; ++i)
+ 		for (j =3D 0; j < 16; ++j)
+-			(*cb)(COL_TYPE_IFACE, ifs[i].pfik_name,
++			(*cb)(COL_TYPE_IFACE, ifs[i].pfif_name,
+ 			    j, j & 4 ?
+-			    ifs[i].pfik_packets[j&1?0:1][j&2?0:1][j&8?0:1] :
+-			    ifs[i].pfik_bytes[j&1?0:1][j&2?0:1][j&8?0:1]);
++			    ifs[i].pfif_packets[j&1?0:1][j&2?0:1][j&8?0:1] :
++			    ifs[i].pfif_bytes[j&1?0:1][j&2?0:1][j&8?0:1]);
+ 	/* bytes/packets[af][dir][op] */
+ 	return (0);
+ }

--Boundary-01=_vMPmGP2yavb+Bfl--

--nextPart1264277.4ZZ7psZxiN
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQBGmPM6XyyEoT62BG0RAloKAJ9/hy1k67mYQi+HSQ5YGhDwiFXXbgCfUpAE
LSISYetk1g55bgeiLFLi6Uo=
=/7qG
-----END PGP SIGNATURE-----

--nextPart1264277.4ZZ7psZxiN--



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