1 diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
2 index 5b7f69a56..5536debe8 100644
3 --- a/external/CMakeLists.txt
4 +++ b/external/CMakeLists.txt
8 find_package(Miniupnpc REQUIRED)
10 -message(STATUS "Using in-tree miniupnpc")
11 -set(UPNPC_NO_INSTALL TRUE CACHE BOOL "Disable miniupnp installation" FORCE)
12 -add_subdirectory(miniupnp/miniupnpc)
13 -set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
14 -set_property(TARGET libminiupnpc-static PROPERTY POSITION_INDEPENDENT_CODE ON)
16 - set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -wd4244 -wd4267")
18 - set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-undef -Wno-unused-result -Wno-unused-value")
20 -if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
21 - set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -D_NETBSD_SOURCE")
24 -set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE)
25 +set(UPNP_STATIC false PARENT_SCOPE)
26 +set(UPNP_INCLUDE ${MINIUPNP_INCLUDE_DIR} PARENT_SCOPE)
27 +set(UPNP_LIBRARIES ${MINIUPNP_LIBRARY} PARENT_SCOPE)
31 @@ -69,4 +56,3 @@ endif()
32 add_subdirectory(db_drivers)
33 add_subdirectory(easylogging++)
34 add_subdirectory(qrcodegen)
35 -add_subdirectory(randomx EXCLUDE_FROM_ALL)
36 diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
37 index d4b39869c..13071d898 100644
38 --- a/src/p2p/net_node.inl
39 +++ b/src/p2p/net_node.inl
41 #include "cryptonote_core/cryptonote_core.h"
42 #include "net/parse.h"
44 -#include <miniupnp/miniupnpc/miniupnpc.h>
45 -#include <miniupnp/miniupnpc/upnpcommands.h>
46 -#include <miniupnp/miniupnpc/upnperrors.h>
47 +#include <miniupnpc/miniupnpc.h>
48 +#include <miniupnpc/upnpcommands.h>
49 +#include <miniupnpc/upnperrors.h>
51 #undef MONERO_DEFAULT_LOG_CATEGORY
52 #define MONERO_DEFAULT_LOG_CATEGORY "net.p2p"