n2n: dynamic link to libcap (#9779)

Co-authored-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Beginner 2022-07-18 00:12:24 +08:00 committed by GitHub
parent ce12ca653e
commit 8bb65fc710
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View File

@ -26,12 +26,12 @@ define Package/n2n/template
SUBMENU:=VPN
TITLE:=N2N Peer-to-peer VPN
URL:=http://www.ntop.org/n2n
DEPENDS:=+libcap +libopenssl +libpthread +libzstd
DEPENDS:=+libopenssl +libpthread +libzstd
endef
define Package/n2n
$(call Package/n2n/template)
DEPENDS+=+kmod-tun +resolveip
DEPENDS+=+libcap +kmod-tun +resolveip
endef
define Package/n2n/description

View File

@ -0,0 +1,11 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -185,7 +185,7 @@ if(N2N_OPTION_USE_PCAPLIB AND (NOT DEFIN
# Linux Capabilities
find_library(CAP_LIB cap)
if(CAP_LIB)
- target_link_libraries(edge cap.a)
+ target_link_libraries(edge cap)
set(CMAKE_REQUIRED_LIBRARIES ${CAP_LIB})
ADD_DEFINITIONS("-DHAVE_LIBCAP")
endif()