diff --git a/cmake/StaticBuild.cmake b/cmake/StaticBuild.cmake index db39eff78..4f3902994 100644 --- a/cmake/StaticBuild.cmake +++ b/cmake/StaticBuild.cmake @@ -328,7 +328,9 @@ endif() if(CMAKE_CROSSCOMPILING AND ARCH_TRIPLET MATCHES mingw) set(zmq_patch - PATCH_COMMAND ${PROJECT_SOURCE_DIR}/contrib/apply-patches.sh ${PROJECT_SOURCE_DIR}/contrib/patches/libzmq-mingw-wepoll.patch ${PROJECT_SOURCE_DIR}/contrib/patches/libzmq-mingw-closesocket.patch) + PATCH_COMMAND ${PROJECT_SOURCE_DIR}/contrib/apply-patches.sh + ${PROJECT_SOURCE_DIR}/contrib/patches/libzmq-mingw-wepoll.patch + ${PROJECT_SOURCE_DIR}/contrib/patches/libzmq-mingw-unistd.patch) endif() build_external(zmq @@ -429,7 +431,7 @@ foreach(curl_arch ${curl_arches}) list(APPEND curl_lib_outputs ${curl_prefix}/lib/libcurl.a) endforeach() -message(STATUS "TARGETS: ${curl_lib_targets}") + if(IOS AND num_arches GREATER 1) # We are building multiple architectures for different iOS devices, so we need to glue the diff --git a/contrib/patches/libzmq-mingw-closesocket.patch b/contrib/patches/libzmq-mingw-closesocket.patch deleted file mode 100644 index 1971d6bc9..000000000 --- a/contrib/patches/libzmq-mingw-closesocket.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/tests/testutil.hpp b/tests/testutil.hpp -index c6f5e4de..6a1c8bb8 100644 ---- a/tests/testutil.hpp -+++ b/tests/testutil.hpp -@@ -102,7 +102,6 @@ const uint8_t zmtp_ready_sub[27] = { - #include - #include - #include --#define close closesocket - typedef int socket_size_t; - inline const char *as_setsockopt_opt_t (const void *opt) - { diff --git a/contrib/patches/libzmq-mingw-unistd.patch b/contrib/patches/libzmq-mingw-unistd.patch new file mode 100644 index 000000000..e1528cf96 --- /dev/null +++ b/contrib/patches/libzmq-mingw-unistd.patch @@ -0,0 +1,14 @@ +diff --git a/tests/testutil.hpp b/tests/testutil.hpp +index c6f5e4de78..09b9fa77e5 100644 +--- a/tests/testutil.hpp ++++ b/tests/testutil.hpp +@@ -41,6 +41,9 @@ + // For AF_INET and IPPROTO_TCP + #if defined _WIN32 + #include "../src/windows.hpp" ++#if defined(__MINGW32__) ++#include ++#endif + #else + #include + #include