Attached are two short patches I had to apply to tcpslice to get it to
build on all of our platforms.

-- Jeffrey T. Hutzelman (N3NHS) <[EMAIL PROTECTED]>
   Sr. Research Systems Programmer
   School of Computer Science - Research Computing Facility
   Carnegie Mellon University - Pittsburgh, PA
The following one-line patch makes AC_LBL_LIBPCAP put -lpcap at
the front of $LIBS instead of at the end, just like every other
library.  This is necessary so that $LIBS can be set in configure's
environment to include libraries that libpcap depends on which
configure doesn't know about.  For example, we use this feature
to add a library that defines snprintf on platforms that don't have it.

diff -u X/tcpslice-1.2a1/aclocal.m4 tcpslice-1.2a1/aclocal.m4
--- X/tcpslice-1.2a1/aclocal.m4 Sat Aug 14 19:50:09 1999
+++ tcpslice-1.2a1/aclocal.m4   Thu Jan 10 13:37:01 2002
@@ -203,7 +203,7 @@
                    fi
                    $2="$$2 -I/usr/local/include"
            fi
-           LIBS="$LIBS -lpcap"
+           LIBS="-lpcap $LIBS"
     else
            $1=$libpcap
            $2="-I$d $$2"
The following patch makes tcpslice.c include <time.h> on platforms
where it is safe to do so.  This is required to build on RedHat 7.1,
on which including <sys/time.h> does not result in struct tm being
defined.

diff -u X/tcpslice-1.2a1/tcpslice.c tcpslice-1.2a1/tcpslice.c
--- X/tcpslice-1.2a1/tcpslice.c Fri Aug  4 19:41:35 2000
+++ tcpslice-1.2a1/tcpslice.c   Thu Jan 10 13:43:01 2002
@@ -35,6 +35,10 @@
 #include <sys/file.h>
 #include <sys/stat.h>
 
+#ifdef TIME_WITH_SYS_TIME
+#include <time.h>
+#endif
+
 #include <net/bpf.h>
 
 #include <ctype.h>

Reply via email to