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 +.include +post-patch: +.if ${OSVERSION} >= 800000 + @${REINPLACE_CMD} -e "s|-DCSLIP|-UCSLIP|" \ + ${WRKSRC}/Makefile.inc +.endif + +.include 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 + #include + #include ++#ifdef CSLIP + #include ++#endif + #include + #include + #include +@@ -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