the-tcpdump-group/libpcap — pull request #394 by cybermx (2014-11-27 09:46:25+00:00)
Title: patch partialy fix building on QNX 6.5

Build log:

bash-4.2# ./configure
checking build system type... i386-pc-nto-qnx6.5.0
checking host system type... i386-pc-nto-qnx6.5.0
checking target system type... i386-pc-nto-qnx6.5.0
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking gcc version... 4
checking for inline... inline
checking for __attribute__... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/bitypes.h usability... no
checking sys/bitypes.h presence... no
checking for sys/bitypes.h... no
checking for int8_t... yes
checking for u_int8_t... no
checking for int16_t... yes
checking for u_int16_t... no
checking for int32_t... yes
checking for u_int32_t... no
checking for int64_t... yes
checking for u_int64_t... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for _LARGEFILE_SOURCE value needed for large files... no
checking sys/ioccom.h usability... no
checking sys/ioccom.h presence... no
checking for sys/ioccom.h... no
checking sys/sockio.h usability... yes
checking sys/sockio.h presence... yes
checking for sys/sockio.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking paths.h usability... yes
checking paths.h presence... yes
checking for paths.h... yes
checking linux/types.h usability... no
checking linux/types.h presence... no
checking for linux/types.h... no
checking linux/if_packet.h usability... no
checking linux/if_packet.h presence... no
checking for linux/if_packet.h... no
checking netpacket/packet.h usability... no
checking netpacket/packet.h presence... no
checking for netpacket/packet.h... no
checking netpacket/if_packet.h usability... no
checking netpacket/if_packet.h presence... no
checking for netpacket/if_packet.h... no
checking for net/pfvar.h... yes
checking whether net/pfvar.h defines PF_NAT through PF_NORDR... yes
checking for netinet/if_ether.h... yes
checking for ANSI ioctl definitions... yes
checking for strerror... yes
checking for strlcpy... yes
checking for vsnprintf... yes
checking for snprintf... yes
checking for library containing gethostbyname... -lsocket
checking for library containing socket... none required
checking for library containing putmsg... no
checking for ether_hostton... yes
checking whether ether_hostton is declared... yes
checking if --disable-protochain option is specified... enabled
checking packet capture type... bpf
checking net/if_media.h usability... yes
checking net/if_media.h presence... yes
checking for net/if_media.h... yes
checking whether the system supports zerocopy BPF... no
checking for struct BPF_TIMEVAL... no
checking for getifaddrs... yes
checking ifaddrs.h usability... yes
checking ifaddrs.h presence... yes
checking for ifaddrs.h... yes
checking for socklen_t... yes
checking for getaddrinfo... yes
checking whether to build optimizer debugging code... no
checking whether to build parser debugging code... no
checking whether we have DAG API headers... no (/usr/local/include)
checking whether we have the DAG API... no
checking whether we have Septel API... no
checking whether we have Myricom Sniffer API... no (/opt/snf)
checking for flex... flex
checking for flex 2.4 or higher... yes
checking for bison... bison
checking for ranlib... ranlib
checking for ar... ar
checking if sockaddr struct has the sa_len member... yes
checking if sockaddr_storage struct exists... yes
checking if dl_hp_ppa_info_t struct has dl_module_id_1 member... no
checking if unaligned accesses fail... no
checking for USB sniffing support... no
checking whether the platform could support netfilter sniffing... no
configure: no Bluetooth sniffing support implemented for nto-qnx6.5.0
configure: no CAN sniffing support implemented for nto-qnx6.5.0
configure: no hardware timestamp support implemented for nto-qnx6.5.0
checking for a BSD-compatible install... ./install-sh -c
configure: creating ./config.status
config.status: creating Makefile
config.status: creating pcap-filter.manmisc
config.status: creating pcap-linktype.manmisc
config.status: creating pcap-tstamp.manmisc
config.status: creating pcap-savefile.manfile
config.status: creating pcap.3pcap
config.status: creating pcap_compile.3pcap
config.status: creating pcap_datalink.3pcap
config.status: creating pcap_dump_open.3pcap
config.status: creating pcap_list_datalinks.3pcap
config.status: creating pcap_list_tstamp_types.3pcap
config.status: creating pcap_open_dead.3pcap
config.status: creating pcap_open_offline.3pcap
config.status: creating pcap_set_tstamp_type.3pcap
config.status: creating config.h
config.status: config.h is unchanged
bash-4.2# make
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./pcap-bpf.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./fad-getad.c
In file included from ./pcap/pcap.h:51,
from ./pcap-int.h:39,
from ./fad-getad.c:57:
./pcap/bpf.h:175:1: warning: "DLT_SLIP_BSDOS" redefined
In file included from /usr/qnx650/target/qnx6/usr/include/net/if.h:118,
from ./fad-getad.c:48:
/usr/qnx650/target/qnx6/usr/include/net/dlt.h:59:1: warning: this is the location of the previous definition
In file included from ./pcap/pcap.h:51,
from ./pcap-int.h:39,
from ./fad-getad.c:57:
./pcap/bpf.h:176:1: warning: "DLT_PPP_BSDOS" redefined
In file included from /usr/qnx650/target/qnx6/usr/include/net/if.h:118,
from ./fad-getad.c:48:
/usr/qnx650/target/qnx6/usr/include/net/dlt.h:60:1: warning: this is the location of the previous definition
if grep GIT ./VERSION >/dev/null; then \
read ver <./VERSION; \
echo $ver | tr -d '\012'; \
date +_%Y_%m_%d; \
else \
cat ./VERSION; \
fi | sed -e 's/.*/static const char pcap_version_string[] = "libpcap version &";/' > version.h
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./pcap.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./inet.c
In file included from ./pcap/pcap.h:51,
from ./pcap-int.h:39,
from ./inet.c:79:
./pcap/bpf.h:175:1: warning: "DLT_SLIP_BSDOS" redefined
In file included from /usr/qnx650/target/qnx6/usr/include/net/if.h:118,
from ./inet.c:60:
/usr/qnx650/target/qnx6/usr/include/net/dlt.h:59:1: warning: this is the location of the previous definition
In file included from ./pcap/pcap.h:51,
from ./pcap-int.h:39,
from ./inet.c:79:
./pcap/bpf.h:176:1: warning: "DLT_PPP_BSDOS" redefined
In file included from /usr/qnx650/target/qnx6/usr/include/net/if.h:118,
from ./inet.c:60:
/usr/qnx650/target/qnx6/usr/include/net/dlt.h:60:1: warning: this is the location of the previous definition
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./gencode.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./optimize.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./nametoaddr.c
In file included from ./pcap/pcap.h:51,
from ./pcap-int.h:39,
from ./nametoaddr.c:78:
./pcap/bpf.h:175:1: warning: "DLT_SLIP_BSDOS" redefined
In file included from /usr/qnx650/target/qnx6/usr/include/net/if.h:118,
from ./nametoaddr.c:61:
/usr/qnx650/target/qnx6/usr/include/net/dlt.h:59:1: warning: this is the location of the previous definition
In file included from ./pcap/pcap.h:51,
from ./pcap-int.h:39,
from ./nametoaddr.c:78:
./pcap/bpf.h:176:1: warning: "DLT_PPP_BSDOS" redefined
In file included from /usr/qnx650/target/qnx6/usr/include/net/if.h:118,
from ./nametoaddr.c:61:
/usr/qnx650/target/qnx6/usr/include/net/dlt.h:60:1: warning: this is the location of the previous definition
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./etherent.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./savefile.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./sf-pcap.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./sf-pcap-ng.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./pcap-common.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./bpf_image.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./bpf_dump.c
./runlex.sh flex -Ppcap_ -oscanner.c scanner.l
bison -y -p pcap_ -d grammar.y
mv y.tab.c grammar.c
mv y.tab.h tokdefs.h
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c scanner.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -Dyylval=pcap_lval -c grammar.c
rm -f bpf_filter.c
ln -s ./bpf/net/bpf_filter.c bpf_filter.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c bpf_filter.c
if grep GIT ./VERSION >/dev/null; then \
read ver <./VERSION; \
echo $ver | tr -d '\012'; \
date +_%Y_%m_%d; \
else \
cat ./VERSION; \
fi | sed -e 's/.*/char pcap_version[] = "&";/' > version.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c version.c
ar rc libpcap.a pcap-bpf.o fad-getad.o pcap.o inet.o gencode.o optimize.o nametoaddr.o etherent.o savefile.o sf-pcap.o sf-pcap-ng.o pcap-common.o bpf_image.o bpf_dump.o scanner.o grammar.o bpf_filter.o version.o
ranlib libpcap.a
./config.status --file=pcap-config.tmp:./pcap-config.in
config.status: creating pcap-config.tmp
mv pcap-config.tmp pcap-config
chmod a+x pcap-config