From 46a5af41e7e9348815427dfcf2e0d8d198aabed1 Mon Sep 17 00:00:00 2001 From: hans Date: Wed, 7 Mar 2012 18:56:51 +0000 Subject: Fix build on SunOS. --- net/tcpdpriv/Makefile | 8 +++++++- net/tcpdpriv/distinfo | 5 +++-- net/tcpdpriv/patches/patch-Makefile | 13 +++++++++++++ net/tcpdpriv/patches/patch-aa | 14 +++++++++----- 4 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 net/tcpdpriv/patches/patch-Makefile (limited to 'net') diff --git a/net/tcpdpriv/Makefile b/net/tcpdpriv/Makefile index ca3e7889e70..17f5efc157b 100644 --- a/net/tcpdpriv/Makefile +++ b/net/tcpdpriv/Makefile @@ -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" diff --git a/net/tcpdpriv/distinfo b/net/tcpdpriv/distinfo index 942696cd409..0dc7bd2402f 100644 --- a/net/tcpdpriv/distinfo +++ b/net/tcpdpriv/distinfo @@ -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 diff --git a/net/tcpdpriv/patches/patch-Makefile b/net/tcpdpriv/patches/patch-Makefile new file mode 100644 index 00000000000..32199e890a3 --- /dev/null +++ b/net/tcpdpriv/patches/patch-Makefile @@ -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 diff --git a/net/tcpdpriv/patches/patch-aa b/net/tcpdpriv/patches/patch-aa index ee39d7810e3..c5a1c8cd8b5 100644 --- a/net/tcpdpriv/patches/patch-aa +++ b/net/tcpdpriv/patches/patch-aa @@ -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 #if !defined(osf1) #include -@@ -111,6 +111,10 @@ +@@ -111,6 +111,14 @@ #include ++#if defined(__sun) ++#include ++#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) { -- cgit v1.2.3