diff --git a/cmake/StaticBuild.cmake b/cmake/StaticBuild.cmake index a41356143..3d5bede85 100644 --- a/cmake/StaticBuild.cmake +++ b/cmake/StaticBuild.cmake @@ -206,7 +206,7 @@ add_static_target(sqlite3 sqlite3_external libsqlite3.a) if(ZMQ_VERSION VERSION_LESS 4.3.3 AND CMAKE_CROSSCOMPILING AND ARCH_TRIPLET MATCHES mingw) set(zmq_patch PATCH_COMMAND patch -p1 -i ${PROJECT_SOURCE_DIR}/contrib/cross/patches/libzmq-pr3601-mingw-build-fix.patch - COMMAND patch -p1 -i ${PROJECT_SOURCE_DIR}/contrib/cross/patches/libzmq-pr3613-fix-funcptr-call.patch) + COMMAND patch -p1 -i ${PROJECT_SOURCE_DIR}/contrib/cross/patches/libzmq-win32-release.patch) endif() build_external(zmq DEPENDS sodium_external diff --git a/cmake/win32.cmake b/cmake/win32.cmake index 075eaec14..78f5b2e8b 100644 --- a/cmake/win32.cmake +++ b/cmake/win32.cmake @@ -15,7 +15,7 @@ if(NOT MSVC_VERSION) add_compile_options(-fno-ident -Wa,-mbig-obj) link_libraries( -lws2_32 -lshlwapi -ldbghelp -luser32 -liphlpapi -lpsapi -luserenv ) # zmq requires windows xp or higher - add_definitions(-DWINVER=0x0501 -D_WIN32_WINNT=0x0501) + add_definitions(-DWINVER=0x0500 -D_WIN32_WINNT=0x0500) endif() if(EMBEDDED_CFG) diff --git a/win32-setup/libzmq-latest_release-win32.patch b/contrib/cross/patches/libzmq-win32-release.patch similarity index 100% rename from win32-setup/libzmq-latest_release-win32.patch rename to contrib/cross/patches/libzmq-win32-release.patch diff --git a/llarp/constants/files.hpp b/llarp/constants/files.hpp index 78ead9696..0aa87e7b8 100644 --- a/llarp/constants/files.hpp +++ b/llarp/constants/files.hpp @@ -26,7 +26,7 @@ namespace llarp fs::path homedir; auto pw = getpwuid(getuid()); - if (pw and pw->pw_dir) + if ((pw and pw->pw_uid) and pw->pw_dir) { homedir = pw->pw_dir; }