-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libpcap] Update to 1.10.5, cleanup (#41453)
- Loading branch information
Showing
12 changed files
with
131 additions
and
117 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 9012ef4..88179b0 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -798,6 +798,7 @@ if(WIN32) | ||
cmake_pop_check_state() | ||
if(LIBWS2_32_HAS_GETADDRINFO) | ||
set(PCAP_LINK_LIBRARIES ws2_32 ${PCAP_LINK_LIBRARIES}) | ||
+ set(LIBS "-lws2_32 ${LIBS}") | ||
else(LIBWS2_32_HAS_GETADDRINFO) | ||
message(FATAL_ERROR "getaddrinfo is required, but wasn't found") | ||
endif(LIBWS2_32_HAS_GETADDRINFO) | ||
@@ -3405,7 +3406,8 @@ set(MANMISC_EXPAND | ||
) | ||
|
||
if(BUILD_SHARED_LIBS) | ||
- set(LIBRARIES_TO_INSTALL "${LIBRARY_NAME}" "${LIBRARY_NAME_STATIC}") | ||
+ set(LIBRARIES_TO_INSTALL "${LIBRARY_NAME}") | ||
+ set_target_properties(${LIBRARY_NAME_STATIC} PROPERTIES EXCLUDE_FROM_ALL 1) | ||
else(BUILD_SHARED_LIBS) | ||
set(LIBRARIES_TO_INSTALL "${LIBRARY_NAME_STATIC}") | ||
endif(BUILD_SHARED_LIBS) | ||
@@ -3416,7 +3418,7 @@ if(WIN32 OR CYGWIN OR MSYS) | ||
# the target is Windows; would there ever be a case where | ||
# CYGWIN or MSYS are set but WIN32 *isn't* set? | ||
# | ||
- if(MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8) | ||
+ if(0) | ||
# | ||
# Install 64-bit code built with MSVC in the x64 subdirectories, | ||
# as that's where it expects it to be. | ||
@@ -3463,7 +3465,10 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap-namedb.h DESTINATION ${CMAKE_INST | ||
|
||
# On UN*X, and on Windows when not using MSVC, generate libpcap.pc and | ||
# pcap-config and process man pages and arrange that they be installed. | ||
-if(NOT MSVC) | ||
+if(1) | ||
+ if(MSVC AND NOT BUILD_SHARED_LIBS) | ||
+ string(APPEND PACKAGE_NAME "_static") | ||
+ endif() | ||
set(prefix ${CMAKE_INSTALL_PREFIX}) | ||
set(exec_prefix "\${prefix}") | ||
set(includedir "\${prefix}/include") | ||
@@ -3533,8 +3538,8 @@ if(NOT MSVC) | ||
endif() | ||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pcap-config.in ${CMAKE_CURRENT_BINARY_DIR}/pcap-config @ONLY) | ||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpcap.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc @ONLY) | ||
- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pcap-config DESTINATION bin) | ||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc DESTINATION lib/pkgconfig) | ||
+elseif(0) | ||
|
||
# | ||
# Man pages. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 88179b0..51a2732 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -3222,10 +3222,6 @@ if(WIN32) | ||
# For compatibility, build the shared library without the "lib" prefix on | ||
# MinGW as well. | ||
# | ||
- set_target_properties(${LIBRARY_NAME} PROPERTIES | ||
- PREFIX "" | ||
- OUTPUT_NAME "${LIBRARY_NAME}" | ||
- ) | ||
set_target_properties(${LIBRARY_NAME}_static PROPERTIES | ||
OUTPUT_NAME "${LIBRARY_NAME}" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/nse_nsock.cc b/nse_nsock.cc | ||
index 7cbfcd2..cf9d5db 100644 | ||
--- a/nse_nsock.cc | ||
+++ b/nse_nsock.cc | ||
@@ -29,6 +29,9 @@ | ||
|
||
#define DEFAULT_TIMEOUT 30000 | ||
|
||
+#ifdef PCAP_SOCKET | ||
+# undef PCAP_SOCKET | ||
+#endif | ||
/* Upvalues for library variables */ | ||
enum { | ||
NSOCK_POOL = lua_upvalueindex(1), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters