Skip site navigation (1)Skip section navigation (2)
Date:      30 Mar 2009 02:38:40 +0400
From:      "Alexey V.Degtyarev" <alexey@renatasystems.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/133193: [maintainer update] net/trafshow: FreeBSD 8-CURRENT compatibility fix
Message-ID:  <20090329223840.53557.qmail@hs-9.renatasystems.org>
Resent-Message-ID: <200903292310.n2TNA1u1044581@freefall.freebsd.org>

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

>Number:         133193
>Category:       ports
>Synopsis:       [maintainer update] net/trafshow: FreeBSD 8-CURRENT compatibility fix
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 29 23:10:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Alexey V. Degtyarev
>Release:        FreeBSD 8-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD renatasystems.org 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan 1 08:58:24 UTC 2009 root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:
The recent import of the new pcap into FreeBSD 8 means pcap.h no longer
includes the system's net/bpf.h, which has a required #define ioctl
(BIOCIMMEDIATE):
trafshow.c: In function 'pcap_init':
trafshow.c:343: error: 'BIOCIMMEDIATE' undeclared (first use in this function)
trafshow.c:343: error: (Each undeclared identifier is reported only once
trafshow.c:343: error: for each function it appears in.)
*** Error code 1
>How-To-Repeat:
	
>Fix:

	

--- patch-800074 begins here ---
diff -u -Nr trafshow/Makefile trafshow.new/Makefile
--- trafshow/Makefile	2009-02-18 17:29:17.000000000 +0300
+++ trafshow.new/Makefile	2009-03-30 00:23:19.000000000 +0400
@@ -7,6 +7,7 @@
 
 PORTNAME=	trafshow
 PORTVERSION=	5.2.3
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	net
 MASTER_SITES=	ftp://ftp.nsk.su/pub/RinetSoftware/
@@ -21,10 +22,15 @@
 
 MAN1=		trafshow.1
 
+.include <bsd.port.pre.mk>
+
 post-patch:
 	@${REINPLACE_CMD} -e 's|-D_THREAD_SAFE||' ${WRKSRC}/configure
 	@${REINPLACE_CMD} -e 's|/etc|${PREFIX}/etc|' \
 		${WRKSRC}/colormask.c ${WRKSRC}/trafshow.1 ${WRKSRC}/trafshow.c
+.if ${OSVERSION} >= 800074
+	@${PATCH} -d ${WRKSRC} < ${FILESDIR}/extra-patch-800074+
+.endif
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/trafshow ${PREFIX}/bin
@@ -34,4 +40,4 @@
 		${CP} -p ${PREFIX}/etc/trafshow.dist ${PREFIX}/etc/trafshow; \
 	fi
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -u -Nr trafshow/files/extra-patch-800074+ trafshow.new/files/extra-patch-800074+
--- trafshow/files/extra-patch-800074+	1970-01-01 03:00:00.000000000 +0300
+++ trafshow.new/files/extra-patch-800074+	2009-03-29 23:47:56.000000000 +0400
@@ -0,0 +1,23 @@
+#
+# http://lists.freebsd.org/pipermail/freebsd-ports/2009-March/053823.html
+#
+--- show_dump.c.orig	2009-03-29 23:18:16.000000000 +0400
++++ show_dump.c	2009-03-29 23:18:24.000000000 +0400
+@@ -30,6 +30,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <errno.h>
++#include <net/bpf.h>
+ #include <pcap.h>
+ #include <pthread.h>
+ #include <time.h>
+--- trafshow.c.orig	2009-03-29 23:18:49.000000000 +0400
++++ trafshow.c	2009-03-29 23:18:58.000000000 +0400
+@@ -30,6 +30,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <time.h>
++#include <net/bpf.h>
+ #include <pcap.h>
+ #include <pthread.h>
+ #include <errno.h>
--- patch-800074 ends here ---


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



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