mirror of
https://github.com/monero-project/monero.git
synced 2025-01-20 17:54:37 +00:00
external: update miniupnpc to 2.2.8
This commit is contained in:
parent
b91ead9025
commit
d81da086ec
4 changed files with 34 additions and 32 deletions
5
external/CMakeLists.txt
vendored
5
external/CMakeLists.txt
vendored
|
@ -35,8 +35,13 @@
|
||||||
# ...except for FreeBSD, because FreeBSD is a special case that doesn't play well with
|
# ...except for FreeBSD, because FreeBSD is a special case that doesn't play well with
|
||||||
# others.
|
# others.
|
||||||
|
|
||||||
|
if(NOT MSVC)
|
||||||
|
add_compile_options(-D_GNU_SOURCE)
|
||||||
|
endif()
|
||||||
|
|
||||||
message(STATUS "Using in-tree miniupnpc")
|
message(STATUS "Using in-tree miniupnpc")
|
||||||
set(UPNPC_NO_INSTALL TRUE CACHE BOOL "Disable miniupnp installation" FORCE)
|
set(UPNPC_NO_INSTALL TRUE CACHE BOOL "Disable miniupnp installation" FORCE)
|
||||||
|
set(UPNPC_BUILD_TESTS FALSE CACHE BOOL "Disable miniupnp internal tests." FORCE)
|
||||||
add_subdirectory(miniupnp/miniupnpc)
|
add_subdirectory(miniupnp/miniupnpc)
|
||||||
set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
|
set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
|
||||||
set_property(TARGET libminiupnpc-static PROPERTY POSITION_INDEPENDENT_CODE ON)
|
set_property(TARGET libminiupnpc-static PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||||
|
|
2
external/miniupnp
vendored
2
external/miniupnp
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 544e6fcc73c5ad9af48a8985c94f0f1d742ef2e0
|
Subproject commit b55145ec095652289a59c33603f3abafee898273
|
|
@ -58,9 +58,9 @@
|
||||||
#include "cryptonote_core/cryptonote_core.h"
|
#include "cryptonote_core/cryptonote_core.h"
|
||||||
#include "net/parse.h"
|
#include "net/parse.h"
|
||||||
|
|
||||||
#include <miniupnp/miniupnpc/miniupnpc.h>
|
#include <miniupnpc.h>
|
||||||
#include <miniupnp/miniupnpc/upnpcommands.h>
|
#include <upnpcommands.h>
|
||||||
#include <miniupnp/miniupnpc/upnperrors.h>
|
#include <upnperrors.h>
|
||||||
|
|
||||||
#undef MONERO_DEFAULT_LOG_CATEGORY
|
#undef MONERO_DEFAULT_LOG_CATEGORY
|
||||||
#define MONERO_DEFAULT_LOG_CATEGORY "net.p2p"
|
#define MONERO_DEFAULT_LOG_CATEGORY "net.p2p"
|
||||||
|
@ -2985,7 +2985,8 @@ namespace nodetool
|
||||||
UPNPUrls urls;
|
UPNPUrls urls;
|
||||||
IGDdatas igdData;
|
IGDdatas igdData;
|
||||||
char lanAddress[64];
|
char lanAddress[64];
|
||||||
result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress);
|
char wanaddr[64]; /* up address of the IGD on the WAN */
|
||||||
|
result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, wanaddr, sizeof wanaddr);
|
||||||
freeUPNPDevlist(deviceList);
|
freeUPNPDevlist(deviceList);
|
||||||
if (result > 0) {
|
if (result > 0) {
|
||||||
if (result == 1) {
|
if (result == 1) {
|
||||||
|
@ -3053,7 +3054,8 @@ namespace nodetool
|
||||||
UPNPUrls urls;
|
UPNPUrls urls;
|
||||||
IGDdatas igdData;
|
IGDdatas igdData;
|
||||||
char lanAddress[64];
|
char lanAddress[64];
|
||||||
result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress);
|
char wanaddr[64]; /* up address of the IGD on the WAN */
|
||||||
|
result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, wanaddr, sizeof wanaddr);
|
||||||
freeUPNPDevlist(deviceList);
|
freeUPNPDevlist(deviceList);
|
||||||
if (result > 0) {
|
if (result > 0) {
|
||||||
if (result == 1) {
|
if (result == 1) {
|
||||||
|
|
|
@ -96,12 +96,31 @@ monero_private_headers(daemon_rpc_server
|
||||||
monero_add_library(rpc_base
|
monero_add_library(rpc_base
|
||||||
${rpc_base_sources}
|
${rpc_base_sources}
|
||||||
${rpc_base_headers}
|
${rpc_base_headers}
|
||||||
${rpc_base_private_headers})
|
${rpc_base_private_headers}
|
||||||
|
LINKS
|
||||||
|
common
|
||||||
|
epee
|
||||||
|
${Boost_REGEX_LIBRARY}
|
||||||
|
${Boost_THREAD_LIBRARY}
|
||||||
|
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||||
|
PRIVATE_LINKS
|
||||||
|
${EXTRA_LIBRARIES})
|
||||||
|
|
||||||
monero_add_library(rpc
|
monero_add_library(rpc
|
||||||
${rpc_sources}
|
${rpc_sources}
|
||||||
${rpc_headers}
|
${rpc_headers}
|
||||||
${rpc_private_headers})
|
${rpc_private_headers}
|
||||||
|
LINKS
|
||||||
|
rpc_base
|
||||||
|
common
|
||||||
|
cryptonote_core
|
||||||
|
cryptonote_protocol
|
||||||
|
net
|
||||||
|
version
|
||||||
|
${Boost_REGEX_LIBRARY}
|
||||||
|
${Boost_THREAD_LIBRARY}
|
||||||
|
PRIVATE_LINKS
|
||||||
|
${EXTRA_LIBRARIES})
|
||||||
|
|
||||||
monero_add_library(rpc_pub
|
monero_add_library(rpc_pub
|
||||||
${rpc_pub_sources}
|
${rpc_pub_sources}
|
||||||
|
@ -118,30 +137,6 @@ monero_add_library(daemon_rpc_server
|
||||||
${daemon_rpc_server_headers}
|
${daemon_rpc_server_headers}
|
||||||
${daemon_rpc_server_private_headers})
|
${daemon_rpc_server_private_headers})
|
||||||
|
|
||||||
|
|
||||||
target_link_libraries(rpc_base
|
|
||||||
PUBLIC
|
|
||||||
common
|
|
||||||
epee
|
|
||||||
${Boost_REGEX_LIBRARY}
|
|
||||||
${Boost_THREAD_LIBRARY}
|
|
||||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
|
||||||
PRIVATE
|
|
||||||
${EXTRA_LIBRARIES})
|
|
||||||
|
|
||||||
target_link_libraries(rpc
|
|
||||||
PUBLIC
|
|
||||||
rpc_base
|
|
||||||
common
|
|
||||||
cryptonote_core
|
|
||||||
cryptonote_protocol
|
|
||||||
net
|
|
||||||
version
|
|
||||||
${Boost_REGEX_LIBRARY}
|
|
||||||
${Boost_THREAD_LIBRARY}
|
|
||||||
PRIVATE
|
|
||||||
${EXTRA_LIBRARIES})
|
|
||||||
|
|
||||||
target_link_libraries(rpc_pub
|
target_link_libraries(rpc_pub
|
||||||
PUBLIC
|
PUBLIC
|
||||||
epee
|
epee
|
||||||
|
|
Loading…
Reference in a new issue