diff options
author | db <db@FreeBSD.org> | 2009-05-30 02:23:56 +0800 |
---|---|---|
committer | db <db@FreeBSD.org> | 2009-05-30 02:23:56 +0800 |
commit | 74349f4a14a23db706777bfdc1478a8da3dd9a2b (patch) | |
tree | 5516cc73af3f63891f59a551f3467df6c12cc468 /net-mgmt/trafd | |
parent | 5cc54d330a177ecb83312c1ab9d73f4f72241bb2 (diff) | |
download | freebsd-ports-gnome-74349f4a14a23db706777bfdc1478a8da3dd9a2b.tar.gz freebsd-ports-gnome-74349f4a14a23db706777bfdc1478a8da3dd9a2b.tar.zst freebsd-ports-gnome-74349f4a14a23db706777bfdc1478a8da3dd9a2b.zip |
- Unbreak on current (-8)
if_sl no longer exists in FreeBSD-8.x
Diffstat (limited to 'net-mgmt/trafd')
-rw-r--r-- | net-mgmt/trafd/Makefile | 9 | ||||
-rw-r--r-- | net-mgmt/trafd/files/patch-Makefile.inc | 13 | ||||
-rw-r--r-- | net-mgmt/trafd/files/patch-lib_interfaces.c | 37 |
3 files changed, 56 insertions, 3 deletions
diff --git a/net-mgmt/trafd/Makefile b/net-mgmt/trafd/Makefile index aef90abed843..a6c98ec8ca20 100644 --- a/net-mgmt/trafd/Makefile +++ b/net-mgmt/trafd/Makefile @@ -37,4 +37,11 @@ do-install: @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} .endif -.include <bsd.port.mk> +.include <bsd.port.pre.mk> +post-patch: +.if ${OSVERSION} >= 800000 + @${REINPLACE_CMD} -e "s|-DCSLIP|-UCSLIP|" \ + ${WRKSRC}/Makefile.inc +.endif + +.include <bsd.port.post.mk> diff --git a/net-mgmt/trafd/files/patch-Makefile.inc b/net-mgmt/trafd/files/patch-Makefile.inc index c5e73a0dc114..f34d748eaf9c 100644 --- a/net-mgmt/trafd/files/patch-Makefile.inc +++ b/net-mgmt/trafd/files/patch-Makefile.inc @@ -1,5 +1,5 @@ ---- Makefile.inc.orig 2009-04-21 09:52:03.000000000 +0100 -+++ Makefile.inc 2009-04-21 09:54:50.000000000 +0100 +--- Makefile.inc.orig 2002-11-27 08:40:39.000000000 -0500 ++++ Makefile.inc 2009-05-29 14:09:06.000000000 -0400 @@ -18,11 +18,11 @@ PREFIX?=/usr/local @@ -15,3 +15,12 @@ TRAFSTAT_PORT=150 TRAFLOG_FMT=${PREFIX}/etc/traflog.format +@@ -40,6 +40,7 @@ + -DPATH_TRAFSTAT=\"${TRAFSTAT}\" \ + -DPATH_TRAFSTAT_LOG=\"${TRAFSTAT_LOG}\" \ + -DPATH_TRAFLOG_FMT=\"${TRAFLOG_FMT}\" \ +- -DTRAFSTAT_PORT=${TRAFSTAT_PORT} ++ -DTRAFSTAT_PORT=${TRAFSTAT_PORT} \ ++ -DCSLIP + + diff --git a/net-mgmt/trafd/files/patch-lib_interfaces.c b/net-mgmt/trafd/files/patch-lib_interfaces.c new file mode 100644 index 000000000000..c1d710d24eab --- /dev/null +++ b/net-mgmt/trafd/files/patch-lib_interfaces.c @@ -0,0 +1,37 @@ +--- lib/interfaces.c.orig 2002-11-27 08:40:33.000000000 -0500 ++++ lib/interfaces.c 2009-05-29 14:20:33.000000000 -0400 +@@ -32,7 +32,9 @@ + #include <netinet/in.h> + #include <net/ethernet.h> + #include <net/ppp_defs.h> ++#ifdef CSLIP + #include <net/slip.h> ++#endif + #include <netinet/if_ether.h> + #include <netinet/in_systm.h> + #include <netinet/ip.h> +@@ -60,8 +62,10 @@ + + static struct printer printers[] = { + { ether_if_print, DLT_EN10MB }, ++#ifdef CSLIP + { sl_if_print, DLT_SLIP }, + { sl_bsdos_if_print, DLT_SLIP_BSDOS }, ++#endif + { ppp_if_print, DLT_PPP }, + { ppp_bsdos_if_print, DLT_PPP_BSDOS }, + { null_if_print, DLT_NULL }, +@@ -232,6 +236,8 @@ + processing_ip(p, length); + } + ++#ifdef CSLIP ++ + /* XXX BSD/OS 2.1 compatibility */ + #if !defined(SLIP_HDRLEN) && defined(SLC_BPFHDR) + #define SLIP_HDRLEN SLC_BPFHDR +@@ -288,3 +294,4 @@ + processing_ip(p + SLIP_HDRLEN, length); + + } ++#endif |