Can't compile ssldump on FreeBSD 6 - compile fails
When compiling ssldump on freebsd, the configure script uses stock bpf.h header file instead of the libpcap one.
Code:
===> Building for ssldump-0.9b3_4
cc -O2 -pipe -funroll-loops -fno-strict-aliasing -march=pentium4 -O2 -pipe -funroll-loops -fno-strict-aliasing -march=pentium4 -DHAVE_LIBM=1 -DHAVE_SYS_TIME_H=1 -DSTDC_HEADERS=1 -DTIME_WITH_SYS_TIME=1 -DSIZEOF_UNSIGNED_SHORT=2 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=4 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_STRDUP=1 -c -o pcap-snoop.o ./base/pcap-snoop.c -DOPENSSL -I./base/ -I./null/ -I./ssl/ -Icommon/include/ -I./null/ -I./ssl/ -I/usr/local/include
In file included from ./base/pcap-snoop.c:52:
/usr/include/net/bpf.h:63: error: redefinition of `struct bpf_program'
/usr/include/net/bpf.h:87: error: redefinition of `struct bpf_version'
/usr/include/net/bpf.h:596: error: redefinition of `struct bpf_insn'
./base/pcap-snoop.c: In function `main':
./base/pcap-snoop.c:207: warning: passing arg 2 of `signal' from incompatible pointer type
./base/pcap-snoop.c:329: warning: passing arg 3 of `pcap_loop' from incompatible pointer type
*** Error code 1
Stop in /usr/ports/net/ssldump/work/ssldump-0.9b3.
*** Error code 1
Stop in /usr/ports/net/ssldump.
The fix is to clean the instalation and run a new make:
Code:
# cd /usr/ports/net/ssldump
# make clean
# make CONFIGURE_ARGS= --with-pcap-inc=/usr/local/include/pcap/
And now it works
_________________
VPSie - SSD VPS servers in AMS-IX, LINX, DE-CIX
https://vpsie.com