]> The Tcpdump Group git mirrors - libpcap/commitdiff
Fix MSVC build.
authorGuy Harris <[email protected]>
Tue, 3 Apr 2018 01:57:25 +0000 (18:57 -0700)
committerGuy Harris <[email protected]>
Tue, 3 Apr 2018 01:57:25 +0000 (18:57 -0700)
We need to use PCAP_API in the declarations.

nametoaddr.c
pcap.c

index a749b8e68c4fdb29cb9d9710532ea451e992b8c9..087d14be750d663d9e2edc91e93790d5321b630e 100644 (file)
@@ -550,7 +550,7 @@ struct eproto {
  * warnings we might get from compilers about the lack of a
  * declaration.
  */
-extern struct eproto eproto_db[];
+PCAP_API struct eproto eproto_db[];
 PCAP_API_DEF struct eproto eproto_db[] = {
        { "pup", ETHERTYPE_PUP },
        { "xns", ETHERTYPE_NS },
diff --git a/pcap.c b/pcap.c
index e1d88389216229e2cdba1c80cf3a38464738f48d..44dbe3de6b53753552d2af104dc1755581547477 100644 (file)
--- a/pcap.c
+++ b/pcap.c
@@ -181,7 +181,7 @@ pcap_wsockinit(void)
  * warnings we might get from compilers about the lack of a
  * declaration.
  */
-extern char pcap_version[];
+PCAP_API char pcap_version[];
 PCAP_API_DEF char pcap_version[] = PACKAGE_VERSION;
 
 static int