aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--Makefile.in2
-rw-r--r--pcap/pcap.h2
3 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ca129f67..ad95aada 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1547,6 +1547,8 @@ if(BUILD_SHARED_LIBS)
${PROJECT_EXTERNAL_OBJECT_LIST}
)
add_dependencies(${LIBRARY_NAME} SerializeTarget)
+ set_target_properties(${LIBRARY_NAME} PROPERTIES
+ COMPILE_DEFINITIONS BUILDING_PCAP)
endif(BUILD_SHARED_LIBS)
add_library(${LIBRARY_NAME}_static STATIC
@@ -1556,6 +1558,8 @@ add_library(${LIBRARY_NAME}_static STATIC
${PROJECT_EXTERNAL_OBJECT_LIST}
)
add_dependencies(${LIBRARY_NAME}_static SerializeTarget)
+set_target_properties(${LIBRARY_NAME}_static PROPERTIES
+ COMPILE_DEFINITIONS BUILDING_PCAP)
if(WIN32)
if(BUILD_SHARED_LIBS)
diff --git a/Makefile.in b/Makefile.in
index 746543ae..4f17169a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -52,7 +52,7 @@ MKDEP = @MKDEP@
CCOPT = @V_CCOPT@
SHLIB_CCOPT = @V_SHLIB_CCOPT@
INCLS = -I. @V_INCLS@
-DEFS = -Dpcap_EXPORTS @DEFS@ @V_DEFS@
+DEFS = -DBUILDING_PCAP -Dpcap_EXPORTS @DEFS@ @V_DEFS@
ADDLOBJS = @ADDLOBJS@
ADDLARCHIVEOBJS = @ADDLARCHIVEOBJS@
LIBS = @LIBS@
diff --git a/pcap/pcap.h b/pcap/pcap.h
index 11a2e87e..d32e2a9a 100644
--- a/pcap/pcap.h
+++ b/pcap/pcap.h
@@ -419,7 +419,7 @@ PCAP_API pcap_t *pcap_open_offline(const char *, char *);
* runtime with which libpcap was built. (Maybe once the Universal CRT
* rules the world, this will cease to be a problem.)
*/
- #ifndef pcap_EXPORTS
+ #ifndef BUILDING_PCAP
#define pcap_fopen_offline_with_tstamp_precision(f,p,b) \
pcap_hopen_offline_with_tstamp_precision(_get_osfhandle(_fileno(f)), p, b)
#define pcap_fopen_offline(f,b) \