1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-09 07:59:03 +00:00

Prevent redeclaration of PCAP_NETMASK_UNKNOWN when using included libpcap

This commit is contained in:
dmiller
2014-12-30 22:38:32 +00:00
parent 8753e731f6
commit 7dacfcefa4
2 changed files with 20 additions and 18 deletions

33
configure vendored
View File

@@ -6514,22 +6514,7 @@ if test "$ac_res" != no; then :
fi
else
$as_echo "#define HAVE_LIBPCAP 1" >>confdefs.h
LIBPCAP_LIBS="-lpcap"
PCAP_DEPENDS=""
PCAP_BUILD=""
PCAP_CLEAN=""
PCAP_DIST_CLEAN=""
fi
# We assume our included libpcap doesn't need this check-and-define
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if PCAP_NETMASK_UNKNOWN is defined/handled by libpcap" >&5
$as_echo_n "checking if PCAP_NETMASK_UNKNOWN is defined/handled by libpcap... " >&6; }
@@ -6568,6 +6553,22 @@ $as_echo "#define PCAP_NETMASK_UNKNOWN 0" >>confdefs.h
$as_echo "$ac_cv_have_pcap_netmask_unknown" >&6; }
$as_echo "#define HAVE_LIBPCAP 1" >>confdefs.h
LIBPCAP_LIBS="-lpcap"
PCAP_DEPENDS=""
PCAP_BUILD=""
PCAP_CLEAN=""
PCAP_DIST_CLEAN=""
fi
have_pcre=no
requested_included_pcre=no
LIBPCREDIR=libpcre

View File

@@ -447,6 +447,9 @@ if test $have_libpcap != yes; then
# libpcap can require libnl
AC_SEARCH_LIBS(nl_handle_alloc, nl)
else
# We assume our included libpcap doesn't need this check-and-define
PCAP_DEFINE_NETMASK_UNKNOWN
AC_DEFINE(HAVE_LIBPCAP, 1, [Have libpcap library])
LIBPCAP_LIBS="-lpcap"
PCAP_DEPENDS=""
@@ -461,8 +464,6 @@ AC_SUBST(PCAP_CLEAN)
AC_SUBST(PCAP_DIST_CLEAN)
AC_SUBST(LIBPCAP_LIBS)
PCAP_DEFINE_NETMASK_UNKNOWN
have_pcre=no
requested_included_pcre=no
LIBPCREDIR=libpcre