vcpkg/ports/mosquitto/0006-pthreads-for-windows.patch
Billy O'Neal a9794606a6
[mosquitto] Update to 2.0.18 (#34456)
* [mosquitto] Update to 2.0.18

* Disable android.

```
ci/installed/arm-neon-android/debug/lib/libssl.a  /mnt/vcpkg-ci/installed/arm-neon-android/debug/lib/libcrypto.a  -pthread  -ldl  -latomic -lm && :
ld: error: undefined symbol: getgrgid_r
>>> referenced by misc_mosq.c:192 (/mnt/vcpkg-ci/buildtrees/mosquitto/src/v2.0.18-5deb484567.clean/lib/misc_mosq.c:192)
>>>               lib/CMakeFiles/libmosquitto.dir/misc_mosq.c.o:(mosquitto__fopen)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
2023-10-18 10:26:15 -07:00

16 lines
527 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c55e05..adece3e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,8 +68,8 @@ option(WITH_THREADING "Include client library threading support?" ON)
if (WITH_THREADING)
add_definitions("-DWITH_THREADING")
if (WIN32)
- find_package(Threads REQUIRED)
- set (PTHREAD_LIBRARIES Threads::Threads)
+ find_package(pthread CONFIG REQUIRED)
+ set (PTHREAD_LIBRARIES PThreads4W::PThreads4W)
set (PTHREAD_INCLUDE_DIR "")
elseif (ANDROID)
set (PTHREAD_LIBRARIES "")