Fix build on SunOS.
This commit is contained in:
parent
c1d23f2d14
commit
e6d8b38456
4 changed files with 32 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.17 2011/03/17 22:07:50 zafer Exp $
|
||||
# $NetBSD: Makefile,v 1.18 2012/03/07 18:56:51 hans Exp $
|
||||
|
||||
DISTNAME= tcpd-tools-0.8
|
||||
PKGNAME= tcpdpriv-0.8
|
||||
|
@ -10,6 +10,11 @@ COMMENT= Anonymize tcpdump traces
|
|||
|
||||
PKG_DESTDIR_SUPPORT= user-destdir
|
||||
|
||||
CFLAGS.SunOS+= -DSVR4 -DIPPROTO_IPV4=IPPROTO_ENCAP -DIP_OFFMASK=0x1fff
|
||||
CFLAGS.SunOS+= -DARPOP_REVREQUEST=REVARP_REQUEST -DARPOP_REVREPLY=REVARP_REPLY
|
||||
CFLAGS.SunOS+= -Du_int64_t=uint64_t -Du_int32_t=uint32_t
|
||||
CFLAGS.SunOS+= -Du_int16_t=uint16_t -Du_int8_t=uint8_t
|
||||
|
||||
WRKSRC= ${WRKDIR}/${DISTNAME}/wide-tcpdpriv
|
||||
|
||||
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
|
||||
|
@ -18,4 +23,5 @@ do-install:
|
|||
${INSTALL_PROGRAM} ${WRKSRC}/tcpdpriv ${DESTDIR}${PREFIX}/bin
|
||||
${INSTALL_MAN} ${WRKSRC}/tcpdpriv.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
|
||||
|
||||
.include "../../net/libpcap/buildlink3.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
$NetBSD: distinfo,v 1.7 2012/01/08 15:05:58 shattered Exp $
|
||||
$NetBSD: distinfo,v 1.8 2012/03/07 18:56:52 hans Exp $
|
||||
|
||||
SHA1 (tcpd-tools-0.8.tar.gz) = fe2abe15bbf9062833af9bec3745c751a8aa06df
|
||||
RMD160 (tcpd-tools-0.8.tar.gz) = 876842cbb37ca65d4b955718abd5ef5c14810dee
|
||||
Size (tcpd-tools-0.8.tar.gz) = 468856 bytes
|
||||
SHA1 (patch-aa) = 43f625fdca8fa89da88a9fc5f796455723b6ea7c
|
||||
SHA1 (patch-Makefile) = 96ac3e3a0167807606a0f764467da84dcc55d90d
|
||||
SHA1 (patch-aa) = 0470590f1baf8748a62d7542b70630478aa806c7
|
||||
SHA1 (patch-ab) = 2c939882835b80d1fb11aa3bedc50eb80cefdf2e
|
||||
|
|
13
net/tcpdpriv/patches/patch-Makefile
Normal file
13
net/tcpdpriv/patches/patch-Makefile
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-Makefile,v 1.1 2012/03/07 18:56:52 hans Exp $
|
||||
|
||||
--- Makefile.orig 2000-03-02 07:54:28.000000000 +0100
|
||||
+++ Makefile 2012-03-07 19:45:53.802691270 +0100
|
||||
@@ -29,7 +29,7 @@ CC = gcc
|
||||
|
||||
#have-SVR4#LIBSVR4 = -lsocket -lnsl
|
||||
|
||||
-CFLAGS = -g ${INCLUDES} ${WARNINGS} ${SVR4} ${OSF1} -DWIDE
|
||||
+CFLAGS += -g ${INCLUDES} ${WARNINGS} ${SVR4} ${OSF1} -DWIDE
|
||||
|
||||
SOURCES = tcpdpriv.c tcpdutil.c tcpdpriv.1 tcpdpriv.vtml \
|
||||
attack50.tex Makefile.in configure INSTALL
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: patch-aa,v 1.5 2012/01/08 15:05:58 shattered Exp $
|
||||
$NetBSD: patch-aa,v 1.6 2012/03/07 18:56:52 hans Exp $
|
||||
|
||||
--- tcpdpriv.c.orig 2000-04-18 07:59:19.000000000 +0000
|
||||
+++ tcpdpriv.c
|
||||
|
@ -29,10 +29,14 @@ $NetBSD: patch-aa,v 1.5 2012/01/08 15:05:58 shattered Exp $
|
|||
#include <net/slcompress.h>
|
||||
#if !defined(osf1)
|
||||
#include <net/slip.h>
|
||||
@@ -111,6 +111,10 @@
|
||||
@@ -111,6 +111,14 @@
|
||||
|
||||
#include <pcap.h>
|
||||
|
||||
+#if defined(__sun)
|
||||
+#include <sys/sysmacros.h>
|
||||
+#endif
|
||||
+
|
||||
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 299000900) /* NetBSD 2.99.9 */
|
||||
+#define statfs statvfs
|
||||
+#endif
|
||||
|
@ -40,7 +44,7 @@ $NetBSD: patch-aa,v 1.5 2012/01/08 15:05:58 shattered Exp $
|
|||
/*
|
||||
* deal with systems in which bpf_int32 and bpf_u_int32 are not defined
|
||||
*/
|
||||
@@ -2491,10 +2495,10 @@ dlt_hdrlen(int dlt)
|
||||
@@ -2491,10 +2499,10 @@ dlt_hdrlen(int dlt)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,7 +56,7 @@ $NetBSD: patch-aa,v 1.5 2012/01/08 15:05:58 shattered Exp $
|
|||
|
||||
lookup_init(&addr_propagate);
|
||||
|
||||
@@ -2759,7 +2763,7 @@ usage(char *cmd)
|
||||
@@ -2759,7 +2767,7 @@ usage(char *cmd)
|
||||
int
|
||||
main(int argc, char *argv[], char *envp[])
|
||||
{
|
||||
|
@ -61,7 +65,7 @@ $NetBSD: patch-aa,v 1.5 2012/01/08 15:05:58 shattered Exp $
|
|||
char *copy_argv(register char **argv);
|
||||
char *read_infile(char *fname);
|
||||
char *rfile, *wfile;
|
||||
@@ -2903,7 +2907,7 @@ main(int argc, char *argv[], char *envp[
|
||||
@@ -2903,7 +2911,7 @@ main(int argc, char *argv[], char *envp[
|
||||
|
||||
/* dump? */
|
||||
if (dflag) {
|
||||
|
|
Loading…
Reference in a new issue