Address the warning below (specific to a few versions of Clang, CMake
and FreeBSD) and update the exemption rule comment in build.sh.
tcpdump.c:244:16: warning: no previous extern declaration for non-static
variable 'capdns' [-Wmissing-variable-declarations]
(cherry picked from commit
e5bf4ceec7bf1a5a08852ad3a449a5f259f9bed5)
static uint32_t f_netmask;
static uint32_t f_localnet;
#ifdef HAVE_CASPER
-extern cap_channel_t *capdns;
+cap_channel_t *capdns;
#endif
/*
#include "extract.h"
+#ifdef HAVE_CASPER
+#include <libcasper.h>
+extern cap_channel_t *capdns;
+#endif
+
/*
* Definition to let us compile most of the IPv6 code even on systems
* without IPv6 support.
# [-Werror,-Wc11-extensions]
# tcpdump.c:2443:9: error: '_Generic' is a C11 extension
# [-Werror,-Wc11-extensions]
- # tcpdump.c:244:16: error: no previous extern declaration for non-static variable
- # 'capdns' [-Werror,-Wmissing-variable-declarations]
TCPDUMP_TAINTED=yes
;;
esac
char *program_name;
-#ifdef HAVE_CASPER
-cap_channel_t *capdns;
-#endif
-
/* Forwards */
static NORETURN void error(FORMAT_STRING(const char *), ...) PRINTFLIKE(1, 2);
static void warning(FORMAT_STRING(const char *), ...) PRINTFLIKE(1, 2);