mailing list archives
Build fails on system with ancient version of libpcap installed
From: Paul Howarth <paul () city-fan org>
Date: Mon, 31 Jan 2011 13:24:40 +0000
Trying to build nmap - with the bundled libpcap - fails on systems with
ancient versions of libpcap (e.g. 0.7.2) installed:
$ ./configure \
gcc -c -I/usr/kerberos/include -I../../nbase -DHAVE_CONFIG_H
-DNSOCK_VERSION=\"0.02\" -D_FORTIFY_SOURCE=2 -I../include
-I../../libpcap -O2 -g -pipe -march=i386 -mcpu=i686 -Wall nsock_pcap.c
In file included from ../../libpcap/pcap.h:45,
../../libpcap/pcap/pcap.h:352: error: conflicting types for `bpf_filter'
/usr/include/net/bpf.h:448: error: previous declaration of `bpf_filter'
../../libpcap/pcap/pcap.h:353: error: conflicting types for `bpf_validate'
/usr/include/net/bpf.h:447: error: previous declaration of `bpf_validate'
What's happening here is that nsock's configure script is checking for
<net/bpf.h> and finding it on the system, despite the fact that we're
using the bundled libpcap, which doesn't supply that obsolete header
file. So the old system libpcap header files are included in addition to
the much newer bundled libpcap header files and we get the conflict above.
A simple workaround for me was to tell the configure script that we
don't have <net/bpf.h>:
$ export ac_cv_header_net_bpf_h=no
$ ./configure ...
Perhaps the configure script could be tweaked not to check for this
header if the included libpcap is being used in future versions?
Sent through the nmap-dev mailing list
Archived at http://seclists.org/nmap-dev/
- Build fails on system with ancient version of libpcap installed Paul Howarth (Jan 31)