Fix build: embedded Tor linking, UPnP guard, LogPrintf, socket types
- CMakeLists: add --start-group linking for libtor.a and its deps (libevent, openssl, zlib, lzma, zstd) with --allow-multiple-definition for mixed static/dynamic OpenSSL on Windows - CMakeLists: define USE_UPNP=0 only when USE_UPNP is off (not via #ifdef-incompatible define) - net.cpp: guard USE_UPNP reference with #ifdef for builds without UPnP - rpcwallet.cpp: replace nonexistent LogPrintf with printf - tor_embedded.cpp: fix SOCKET type mismatch on Windows (SOCKET vs int) - .gitignore: add testnet-sync/ directory Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -165,8 +165,13 @@ bool CTorEmbedded::Start(int socks, int hsPort, bool enableHiddenService)
|
||||
}
|
||||
|
||||
// Quick port check
|
||||
#ifdef WIN32
|
||||
SOCKET sock = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if (sock != INVALID_SOCKET) {
|
||||
#else
|
||||
int sock = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if (sock >= 0) {
|
||||
#endif
|
||||
struct sockaddr_in addr;
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.sin_family = AF_INET;
|
||||
|
||||
Reference in New Issue
Block a user