Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Feb 2003 20:10:38 +0100 (CET)
From:      Volker Stolz <vs@foldr.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        tung@turtle.ee.ncku.edu.tw
Subject:   ports/48256: [patch] Unbreak net/tcpview (bento)
Message-ID:  <200302131910.h1DJAcEm043376@monster.theater.foldr.org>

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

>Number:         48256
>Category:       ports
>Synopsis:       [patch] Unbreak net/tcpview (bento)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 13 11:20:09 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Volker Stolz
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD monster.theater.foldr.org 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Sun Nov 24 14:40:01 CET 2002 root@monster.theater.foldr.org:/usr/obj/usr/src/sys/MONSTER i386


	
>Description:
Fix build noticed by bento.
- Unbreak (bento)
- CFLAGS police
- frag patches
- clean up install target (now strips all binaries)
- tested on: -CURRENT, -STABLE
>How-To-Repeat:
	
>Fix:
New patch files:
patch-Makefile
patch-callbacks.c
patch-detail_udp.c
patch-print_nfs.c
patch-print_udp.c

--- tcpview begins here ---
diff -urN tcpview.orig/Makefile tcpview/Makefile
--- tcpview.orig/Makefile	Thu Mar  8 12:20:36 2001
+++ tcpview/Makefile	Thu Feb 13 19:47:09 2003
@@ -15,11 +15,20 @@
 
 USE_BISON=	yes
 USE_MOTIF=	yes
+USE_REINPLACE=	yes
+
+MAKE_ARGS=	INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
+		INSTALL_MAN="${INSTALL_MAN}" \
+		INSTALL_DATA="${INSTALL_DATA}"
 
 MAN1=		tcpview.1
 
+post-patch:
+.for f in nametoaddr.c addrtoname.c print-nfs.c detail-tcp.c tv_addrtoname.c
+	@${REINPLACE_CMD} -e 's/NTOHL/ntohl/ ; s/NTOHS/ntohs/' ${WRKSRC}/${f}
+.endfor
+	
 post-install:
-	strip ${PREFIX}/bin/tcpview
 	${CP} ${WRKSRC}/DOC/Tcpview ${X11BASE}/lib/X11/app-defaults/
 
 .include <bsd.port.mk>
diff -urN tcpview.orig/files/patch-Makefile tcpview/files/patch-Makefile
--- tcpview.orig/files/patch-Makefile	Thu Jan  1 01:00:00 1970
+++ tcpview/files/patch-Makefile	Thu Feb 13 19:47:52 2003
@@ -0,0 +1,142 @@
+--- Makefile.orig	Thu Apr 22 23:40:24 1993
++++ Makefile	Thu Feb 13 19:46:28 2003
+@@ -28,10 +28,10 @@
+ #
+ # CSLIP and PPP work only under BPF.					
+ #
+-DEFINES = 
+-CCOPT = -O2
+-INCLUDES = -I..
+-LIB =
++DEFINES = -DCSLIP -DPPP
++CCOPT = 
++INCLUDES = -I.. -I/usr/X11R6/include
++LIB =-ll
+ 
+ # These are for the Sun4 version
+ #CCOPT = -O2 -Bstatic
+@@ -41,20 +41,20 @@
+ XLIB= -lXm -lXt -lX11
+ 
+ # The installed binary is owned by this group.
+-GROUP = staff
++GROUP = wheel
+ 
+ # Full pathname of where to install the binaries
+ BINDEST = /usr/local/bin
+ TCPSLICE_BINDEST = /usr/local/bin
+ 
+ # Full pathname of where to install tcpview support files
+-TCPVIEW_DIR = /usr/local/tcpview
+-FILTER_DIR = /usr/local/tcpview/filters
++TCPVIEW_DIR = /usr/local/lib/tcpview
++FILTER_DIR = /usr/local/lib/tcpview/filters
+ 
+ # Full pathname of where to install the manual entries
+-TCPDUMP_MANDEST = /usr/man/manl/tcpdump.l
+-TCPVIEW_MANDEST = /usr/man/manl/tcpview.l
+-TCPSLICE_MANDEST = /usr/man/manl/tcpslice.l
++TCPDUMP_MANDEST = /usr/local/man/man1/tcpdump.1
++TCPVIEW_MANDEST = /usr/local/man/man1/tcpview.1
++TCPSLICE_MANDEST = /usr/local/man/man1/tcpslice.1
+ 
+ # Standard CFLAGS
+ STANDARD_CFLAGS = $(CCOPT) $(DEFINES) $(INCLUDES)
+@@ -70,7 +70,7 @@
+ #tahoe-bsd#CFLAGS = $(STANDARD_CFLAGS)
+ #vax-bsd#CFLAGS = $(STANDARD_CFLAGS)
+ #vax-ultrix#
+-CFLAGS = $(STANDARD_CFLAGS)
++CFLAGS += $(STANDARD_CFLAGS)
+ #mips-irix#CFLAGS = $(STANDARD_CFLAGS) -D_BSD_COMPAT
+ 
+ SUBDIRS = hp300-bsd mips-ultrix sun?-sunos? sun4-bsd tahoe-bsd vax-bsd \
+@@ -92,7 +92,8 @@
+ # Also, gcc does not remove the .o before forking 'as', which can be a
+ # problem if you don't own the file but can write to the directory.
+ .c.o:
+-	rm -f $@; $(CC) $(CFLAGS) -c $*.c
++#	rm -f $@; $(CC) $(CFLAGS) -c $*.c
++	$(CC) $(CFLAGS) -c $*.c
+ 
+ # List all C source files here
+ 
+@@ -189,7 +190,7 @@
+ 	$(CC) $(CFLAGS) -o $@ $(TCPDUMP_OBJ) $(LIB)
+ 
+ tcpview: $(TCPVIEW_OBJ)
+-	$(CC) $(CFLAGS) -o $@ $(TCPVIEW_OBJ) $(XLIB) $(LIB)
++	$(CC) $(CFLAGS) -o $@ $(TCPVIEW_OBJ) -L/usr/X11R6/lib $(XLIB) $(LIB)
+ 
+ tcpslice: $(TCPSLICE_OBJ)
+ 	$(CC) $(CFLAGS) -o $@ $(TCPSLICE_OBJ)
+@@ -261,20 +262,21 @@
+ 	cd $$dir ; ${MAKE} ${MFLAGS} depend2
+ 
+ tcplex.c: tcplex.l
+-	rm -f $@
++#	rm -f $@
+ 	$(LEX) $<
+ 	mv -f lex.yy.c tcplex.c
+ 
+ tokdefs.h: tcpgram.c
+ tcpgram.c: tcpgram.y
+-	rm -f tcpgram.c tokdefs.h
++#	rm -f tcpgram.c tokdefs.h
+ 	$(YACC) -d $<
+ 	mv y.tab.c tcpgram.c
+ 	mv y.tab.h tokdefs.h
+ 
+ version.o: version.c
+ version.c version.h: VERSION TCPVIEW_VERSION
+-	rm -f version.c ; sed 's/.*/char version[] = "&";/' VERSION > version.c
++#	rm -f version.c ; 
++	sed 's/.*/char version[] = "&";/' VERSION > version.c
+ 	sed 's/.*/char tcpview_version[] = "&";/' TCPVIEW_VERSION >> version.c
+ 	set `sed 's/\([0-9]*\)\.\([0-9]*\).*/\1 \2/' VERSION` ; \
+ 		{ echo '#define VERSION_MAJOR' $$1 ; \
+@@ -287,22 +289,22 @@
+ install: force
+ 	-mkdir -p $(TCPVIEW_DIR)
+ 	-mkdir -p $(FILTER_DIR) 
+-	@dir=$(MD)-$(OS)-tcpdump; set -x; \
+-	cd $$dir ; \
+-	    install -m 755 -g $(GROUP) tcpdump $(DESTDIR)$(BINDEST); \
+-	    install -m 755 tcpslice $(DESTDIR)$(TCPSLICE_BINDEST)
++#	@dir=$(MD)-$(OS)-tcpdump; set -x; \
++#	cd $$dir ; \
++#	    install -m 755 -g $(GROUP) -c tcpdump $(DESTDIR)$(BINDEST); \
++#	    install -m 755 -c tcpslice $(DESTDIR)$(TCPSLICE_BINDEST)
+ 	@dir=$(MD)-$(OS)-tcpview; set -x; \
+ 	cd $$dir ; \
+-	    install -m 755 -g $(GROUP) tcpview $(DESTDIR)$(BINDEST); \
+-	    install -m 755 -g $(GROUP) BGP $(FILTER_DIR); \
+-	    install -m 755 -g $(GROUP) telnet $(FILTER_DIR); \
+-	    install -m 755 -g $(GROUP) generic $(FILTER_DIR); \
++	    ${INSTALL_PROGRAM} -c tcpview $(DESTDIR)$(BINDEST); \
++	    ${INSTALL_PROGRAM} -c BGP $(FILTER_DIR); \
++	    ${INSTALL_PROGRAM} -c telnet $(FILTER_DIR); \
++	    ${INSTALL_PROGRAM} -c generic $(FILTER_DIR); \
+ 	cd ../DOC ; \
+-	install -m 666 -c hosts $(TCPVIEW_DIR); \
+-	install -m 666 -c manuf $(TCPVIEW_DIR); \
+-	install -c tcpdump.1 $(DESTDIR)$(TCPDUMP_MANDEST); \
+-	install -c tcpview.1 $(DESTDIR)$(TCPVIEW_MANDEST); \
+-	install -c tcpslice.1 $(DESTDIR)$(TCPSLICE_MANDEST)
++	${INSTALL_DATA} -c hosts $(TCPVIEW_DIR); \
++	${INSTALL_DATA} -c manuf $(TCPVIEW_DIR); \
++	${INSTALL_MAN} -c tcpview.1 $(DESTDIR)$(TCPVIEW_MANDEST); \
++#	install -m 444 -c tcpdump.1 $(DESTDIR)$(TCPDUMP_MANDEST); \
++#	install -m 444 -c tcpslice.1 $(DESTDIR)$(TCPSLICE_MANDEST)
+ 
+ lint:	force
+ 	lint -hbxn $(CSRC) | \
+@@ -367,8 +369,3 @@
+ 	-../mkdep $(DEFINES) $(INCLUDES) $(TCPVIEW_CSRC) \
+ 		tcpgram.c tcplex.c
+ 	rm -f $(GEN)
+-
+-
+-
+-
+-
diff -urN tcpview.orig/files/patch-aa tcpview/files/patch-aa
--- tcpview.orig/files/patch-aa	Wed Mar  7 13:40:08 2001
+++ tcpview/files/patch-aa	Thu Feb 13 19:08:15 2003
@@ -1,145 +1,3 @@
---- Makefile	Fri Apr 23 05:40:24 1993
-+++ Makefile	Thu Aug 17 19:18:42 2000
-@@ -28,10 +28,10 @@
- #
- # CSLIP and PPP work only under BPF.					
- #
--DEFINES = 
-+DEFINES = -DCSLIP -DPPP
- CCOPT = -O2
--INCLUDES = -I..
--LIB =
-+INCLUDES = -I.. -I/usr/X11R6/include
-+LIB =-ll
- 
- # These are for the Sun4 version
- #CCOPT = -O2 -Bstatic
-@@ -41,20 +41,20 @@
- XLIB= -lXm -lXt -lX11
- 
- # The installed binary is owned by this group.
--GROUP = staff
-+GROUP = wheel
- 
- # Full pathname of where to install the binaries
- BINDEST = /usr/local/bin
- TCPSLICE_BINDEST = /usr/local/bin
- 
- # Full pathname of where to install tcpview support files
--TCPVIEW_DIR = /usr/local/tcpview
--FILTER_DIR = /usr/local/tcpview/filters
-+TCPVIEW_DIR = /usr/local/lib/tcpview
-+FILTER_DIR = /usr/local/lib/tcpview/filters
- 
- # Full pathname of where to install the manual entries
--TCPDUMP_MANDEST = /usr/man/manl/tcpdump.l
--TCPVIEW_MANDEST = /usr/man/manl/tcpview.l
--TCPSLICE_MANDEST = /usr/man/manl/tcpslice.l
-+TCPDUMP_MANDEST = /usr/local/man/man1/tcpdump.1
-+TCPVIEW_MANDEST = /usr/local/man/man1/tcpview.1
-+TCPSLICE_MANDEST = /usr/local/man/man1/tcpslice.1
- 
- # Standard CFLAGS
- STANDARD_CFLAGS = $(CCOPT) $(DEFINES) $(INCLUDES)
-@@ -92,7 +92,8 @@
- # Also, gcc does not remove the .o before forking 'as', which can be a
- # problem if you don't own the file but can write to the directory.
- .c.o:
--	rm -f $@; $(CC) $(CFLAGS) -c $*.c
-+#	rm -f $@; $(CC) $(CFLAGS) -c $*.c
-+	$(CC) $(CFLAGS) -c $*.c
- 
- # List all C source files here
- 
-@@ -189,7 +190,7 @@
- 	$(CC) $(CFLAGS) -o $@ $(TCPDUMP_OBJ) $(LIB)
- 
- tcpview: $(TCPVIEW_OBJ)
--	$(CC) $(CFLAGS) -o $@ $(TCPVIEW_OBJ) $(XLIB) $(LIB)
-+	$(CC) $(CFLAGS) -o $@ $(TCPVIEW_OBJ) -L/usr/X11R6/lib $(XLIB) $(LIB)
- 
- tcpslice: $(TCPSLICE_OBJ)
- 	$(CC) $(CFLAGS) -o $@ $(TCPSLICE_OBJ)
-@@ -261,20 +262,21 @@
- 	cd $$dir ; ${MAKE} ${MFLAGS} depend2
- 
- tcplex.c: tcplex.l
--	rm -f $@
-+#	rm -f $@
- 	$(LEX) $<
- 	mv -f lex.yy.c tcplex.c
- 
- tokdefs.h: tcpgram.c
- tcpgram.c: tcpgram.y
--	rm -f tcpgram.c tokdefs.h
-+#	rm -f tcpgram.c tokdefs.h
- 	$(YACC) -d $<
- 	mv y.tab.c tcpgram.c
- 	mv y.tab.h tokdefs.h
- 
- version.o: version.c
- version.c version.h: VERSION TCPVIEW_VERSION
--	rm -f version.c ; sed 's/.*/char version[] = "&";/' VERSION > version.c
-+#	rm -f version.c ; 
-+	sed 's/.*/char version[] = "&";/' VERSION > version.c
- 	sed 's/.*/char tcpview_version[] = "&";/' TCPVIEW_VERSION >> version.c
- 	set `sed 's/\([0-9]*\)\.\([0-9]*\).*/\1 \2/' VERSION` ; \
- 		{ echo '#define VERSION_MAJOR' $$1 ; \
-@@ -287,22 +289,22 @@
- install: force
- 	-mkdir -p $(TCPVIEW_DIR)
- 	-mkdir -p $(FILTER_DIR) 
--	@dir=$(MD)-$(OS)-tcpdump; set -x; \
--	cd $$dir ; \
--	    install -m 755 -g $(GROUP) tcpdump $(DESTDIR)$(BINDEST); \
--	    install -m 755 tcpslice $(DESTDIR)$(TCPSLICE_BINDEST)
-+#	@dir=$(MD)-$(OS)-tcpdump; set -x; \
-+#	cd $$dir ; \
-+#	    install -m 755 -g $(GROUP) -c tcpdump $(DESTDIR)$(BINDEST); \
-+#	    install -m 755 -c tcpslice $(DESTDIR)$(TCPSLICE_BINDEST)
- 	@dir=$(MD)-$(OS)-tcpview; set -x; \
- 	cd $$dir ; \
--	    install -m 755 -g $(GROUP) tcpview $(DESTDIR)$(BINDEST); \
--	    install -m 755 -g $(GROUP) BGP $(FILTER_DIR); \
--	    install -m 755 -g $(GROUP) telnet $(FILTER_DIR); \
--	    install -m 755 -g $(GROUP) generic $(FILTER_DIR); \
-+	    install -m 755 -g $(GROUP) -c tcpview $(DESTDIR)$(BINDEST); \
-+	    install -m 755 -g $(GROUP) -c BGP $(FILTER_DIR); \
-+	    install -m 755 -g $(GROUP) -c telnet $(FILTER_DIR); \
-+	    install -m 755 -g $(GROUP) -c generic $(FILTER_DIR); \
- 	cd ../DOC ; \
- 	install -m 666 -c hosts $(TCPVIEW_DIR); \
- 	install -m 666 -c manuf $(TCPVIEW_DIR); \
--	install -c tcpdump.1 $(DESTDIR)$(TCPDUMP_MANDEST); \
--	install -c tcpview.1 $(DESTDIR)$(TCPVIEW_MANDEST); \
--	install -c tcpslice.1 $(DESTDIR)$(TCPSLICE_MANDEST)
-+	install -m 444 -c tcpview.1 $(DESTDIR)$(TCPVIEW_MANDEST); \
-+#	install -m 444 -c tcpdump.1 $(DESTDIR)$(TCPDUMP_MANDEST); \
-+#	install -m 444 -c tcpslice.1 $(DESTDIR)$(TCPSLICE_MANDEST)
- 
- lint:	force
- 	lint -hbxn $(CSRC) | \
-@@ -367,8 +369,3 @@
- 	-../mkdep $(DEFINES) $(INCLUDES) $(TCPVIEW_CSRC) \
- 		tcpgram.c tcplex.c
- 	rm -f $(GEN)
--
--
--
--
--
---- callbacks.c	Fri Apr 23 05:22:59 1993
-+++ callbacks.c	Tue Feb 25 22:14:56 1997
-@@ -66,7 +66,9 @@
- extern Widget hex_text_widget;        /* hex (bottom) window */
- extern Widget packet_label;
- 
-+/*
- extern char *sys_errlist[];
-+*/
- 
- #ifdef __STDC__
- void redisplay_current_list(void);
 --- detail-domain.c	Fri Apr 23 04:39:51 1993
 +++ detail-domain.c	Mon Mar  8 23:30:02 1999
 @@ -199,6 +199,7 @@
@@ -201,33 +59,6 @@
  #include <netinet/in.h>
  #include <netinet/in_systm.h>
  #include <netinet/ip.h>
---- detail-udp.c	Fri Apr 23 04:39:55 1993
-+++ detail-udp.c	Mon Mar  8 23:27:39 1999
-@@ -37,6 +37,7 @@
- #endif
- 
- #include <sys/types.h>
-+#include <sys/param.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <netinet/in_systm.h>
-@@ -50,11 +51,15 @@
- #include <errno.h>
- #include <sys/time.h>
- #include <rpc/types.h>
-+#include <rpc/xdr.h>
- #include <rpc/auth.h>
- #include <rpc/auth_unix.h>
- #include <rpc/svc.h>
--#include <rpc/xdr.h>
- #include <rpc/rpc_msg.h>
-+#include <sys/ucred.h> 
-+#include <sys/mount.h>
-+#include <nfs/rpcv2.h>
-+#include <nfs/nfsv2.h>
- #include <nfs/nfs.h>
- 
- #include "interface.h"
 --- md-386.c	Thu Jan  1 08:00:00 1970
 +++ md-386.c	Thu Aug 17 19:15:37 2000
 @@ -0,0 +1,6 @@
@@ -329,65 +160,6 @@
  /*
   * NOTE:  This is a very preliminary hack for FDDI support.
   * There are all sorts of wired in constants & nothing (yet)
---- print-nfs.c	Fri Apr 23 04:40:18 1993
-+++ print-nfs.c	Mon Mar  8 23:24:45 1999
-@@ -38,10 +38,10 @@
- #include <sys/time.h>
- #include <errno.h>
- #include <rpc/types.h>
-+#include <rpc/xdr.h>
- #include <rpc/auth.h>
- #include <rpc/auth_unix.h>
- #include <rpc/svc.h>
--#include <rpc/xdr.h>
- #include <rpc/rpc_msg.h>
- 
- #include <ctype.h>
-@@ -54,6 +54,13 @@
- /* These must come after interface.h for BSD. */
- #if BSD >= 199006
- #include <sys/ucred.h>
-+#include <sys/mount.h>
-+/*#include <rpcsvc/nfs_prot.h>*/
-+#define	NFSPROC_WRITECACHE ((unsigned long)(7))
-+#define	NFSPROC_ROOT ((unsigned long)(3))
-+#define	NFSPROC_STATFS ((unsigned long)(17))
-+
-+#include <nfs/rpcv2.h>
- #include <nfs/nfsv2.h>
- #endif
- #include <nfs/nfs.h>
-@@ -250,11 +257,13 @@
- 			return;
- 		break;
- 
-+/*
- #if RFS_ROOT != NFSPROC_NOOP
- 	case RFS_ROOT:
- 		printf(" root");
- 		break;
- #endif
-+*/
- 	case RFS_LOOKUP:
- 		printf(" lookup");
- 		if ((dp = parsereq(rp, length)) != 0 && parsefhn(dp) != 0)
-@@ -277,7 +286,7 @@
- 			return;
- 		}
- 		break;
--
-+/*
- #if RFS_WRITECACHE != NFSPROC_NOOP
- 	case RFS_WRITECACHE:
- 		printf(" writecache");
-@@ -291,6 +300,7 @@
- 		}
- 		break;
- #endif
-+*/
- 	case RFS_WRITE:
- 		printf(" write");
- 		if ((dp = parsereq(rp, length)) != 0 &&
 --- print-snmp.c	Fri Apr 23 04:40:27 1993
 +++ print-snmp.c	Wed Feb 26 00:13:29 1997
 @@ -1045,7 +1045,7 @@
@@ -413,29 +185,6 @@
  #include <rpc/rpc_msg.h>
  
  #include <rpc/pmap_prot.h>
---- print-udp.c	Fri Apr 23 04:40:29 1993
-+++ print-udp.c	Mon Mar  8 23:02:08 1999
-@@ -39,10 +39,10 @@
- #include <errno.h>
- #include <sys/time.h>
- #include <rpc/types.h>
-+#include <rpc/xdr.h>
- #include <rpc/auth.h>
- #include <rpc/auth_unix.h>
- #include <rpc/svc.h>
--#include <rpc/xdr.h>
- #include <rpc/rpc_msg.h>
- 
- #ifdef TCPVIEW
-@@ -53,6 +53,8 @@
- /* These must come after interface.h for BSD. */
- #if BSD >= 199006
- #include <sys/ucred.h>
-+#include <sys/mount.h>
-+#include <nfs/rpcv2.h>
- #include <nfs/nfsv2.h>
- #endif
- #include <nfs/nfs.h>
 --- tcpview.c	Fri Apr 23 04:40:33 1993
 +++ tcpview.c	Tue Feb 25 23:48:35 1997
 @@ -33,7 +33,7 @@
diff -urN tcpview.orig/files/patch-callbacks.c tcpview/files/patch-callbacks.c
--- tcpview.orig/files/patch-callbacks.c	Thu Jan  1 01:00:00 1970
+++ tcpview/files/patch-callbacks.c	Thu Feb 13 19:14:55 2003
@@ -0,0 +1,11 @@
+--- callbacks.c.orig	Thu Feb 13 19:14:15 2003
++++ callbacks.c	Thu Feb 13 19:14:42 2003
+@@ -66,7 +66,7 @@
+ extern Widget hex_text_widget;        /* hex (bottom) window */
+ extern Widget packet_label;
+ 
+-extern char *sys_errlist[];
++extern __const char *__const sys_errlist[];
+ 
+ #ifdef __STDC__
+ void redisplay_current_list(void);
diff -urN tcpview.orig/files/patch-detail_udp.c tcpview/files/patch-detail_udp.c
--- tcpview.orig/files/patch-detail_udp.c	Thu Jan  1 01:00:00 1970
+++ tcpview/files/patch-detail_udp.c	Thu Feb 13 18:57:46 2003
@@ -0,0 +1,28 @@
+--- detail-udp.c.orig	Thu Apr 22 22:39:55 1993
++++ detail-udp.c	Thu Feb 13 18:57:17 2003
+@@ -37,6 +37,7 @@
+ #endif
+ 
+ #include <sys/types.h>
++#include <sys/param.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <netinet/in_systm.h>
+@@ -50,12 +51,15 @@
+ #include <errno.h>
+ #include <sys/time.h>
+ #include <rpc/types.h>
++#include <rpc/xdr.h>
+ #include <rpc/auth.h>
+ #include <rpc/auth_unix.h>
+ #include <rpc/svc.h>
+-#include <rpc/xdr.h>
+ #include <rpc/rpc_msg.h>
+-#include <nfs/nfs.h>
++#include <sys/ucred.h> 
++#include <sys/mount.h>
++#include <nfs/rpcv2.h>
++#include <nfs/nfsproto.h>
+ 
+ #include "interface.h"
+ #include "addrtoname.h"
diff -urN tcpview.orig/files/patch-print_nfs.c tcpview/files/patch-print_nfs.c
--- tcpview.orig/files/patch-print_nfs.c	Thu Jan  1 01:00:00 1970
+++ tcpview/files/patch-print_nfs.c	Thu Feb 13 18:53:34 2003
@@ -0,0 +1,63 @@
+--- print-nfs.c.orig	Thu Apr 22 22:40:18 1993
++++ print-nfs.c	Thu Feb 13 18:53:20 2003
+@@ -38,10 +38,10 @@
+ #include <sys/time.h>
+ #include <errno.h>
+ #include <rpc/types.h>
++#include <rpc/xdr.h>
+ #include <rpc/auth.h>
+ #include <rpc/auth_unix.h>
+ #include <rpc/svc.h>
+-#include <rpc/xdr.h>
+ #include <rpc/rpc_msg.h>
+ 
+ #include <ctype.h>
+@@ -54,9 +54,15 @@
+ /* These must come after interface.h for BSD. */
+ #if BSD >= 199006
+ #include <sys/ucred.h>
+-#include <nfs/nfsv2.h>
++#include <sys/mount.h>
++/*#include <rpcsvc/nfs_prot.h>*/
++#define	NFSPROC_WRITECACHE ((unsigned long)(7))
++#define	NFSPROC_ROOT ((unsigned long)(3))
++#define	NFSPROC_STATFS ((unsigned long)(17))
++
++#include <nfs/rpcv2.h>
++#include <nfs/nfsproto.h>
+ #endif
+-#include <nfs/nfs.h>
+ 
+ #include "addrtoname.h"
+ #include "extract.h"
+@@ -250,11 +256,13 @@
+ 			return;
+ 		break;
+ 
++/*
+ #if RFS_ROOT != NFSPROC_NOOP
+ 	case RFS_ROOT:
+ 		printf(" root");
+ 		break;
+ #endif
++*/
+ 	case RFS_LOOKUP:
+ 		printf(" lookup");
+ 		if ((dp = parsereq(rp, length)) != 0 && parsefhn(dp) != 0)
+@@ -277,7 +285,7 @@
+ 			return;
+ 		}
+ 		break;
+-
++/*
+ #if RFS_WRITECACHE != NFSPROC_NOOP
+ 	case RFS_WRITECACHE:
+ 		printf(" writecache");
+@@ -291,6 +299,7 @@
+ 		}
+ 		break;
+ #endif
++*/
+ 	case RFS_WRITE:
+ 		printf(" write");
+ 		if ((dp = parsereq(rp, length)) != 0 &&
diff -urN tcpview.orig/files/patch-print_udp.c tcpview/files/patch-print_udp.c
--- tcpview.orig/files/patch-print_udp.c	Thu Jan  1 01:00:00 1970
+++ tcpview/files/patch-print_udp.c	Thu Feb 13 18:54:33 2003
@@ -0,0 +1,27 @@
+--- print-udp.c.orig	Thu Apr 22 22:40:29 1993
++++ print-udp.c	Thu Feb 13 18:54:06 2003
+@@ -39,10 +39,10 @@
+ #include <errno.h>
+ #include <sys/time.h>
+ #include <rpc/types.h>
++#include <rpc/xdr.h>
+ #include <rpc/auth.h>
+ #include <rpc/auth_unix.h>
+ #include <rpc/svc.h>
+-#include <rpc/xdr.h>
+ #include <rpc/rpc_msg.h>
+ 
+ #ifdef TCPVIEW
+@@ -53,9 +53,10 @@
+ /* These must come after interface.h for BSD. */
+ #if BSD >= 199006
+ #include <sys/ucred.h>
+-#include <nfs/nfsv2.h>
++#include <sys/mount.h>
++#include <nfs/rpcv2.h>
++#include <nfs/nfsproto.h>
+ #endif
+-#include <nfs/nfs.h>
+ 
+ #include "addrtoname.h"
+ #include "appletalk.h"
--- tcpview ends here ---

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

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




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