This is an automated email from the ASF dual-hosted git repository.
dmeden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 4393ce1e35 CMake: Make sure pthread is available when checking for
some of the library functions (#10985)
4393ce1e35 is described below
commit 4393ce1e358b2b5710e2c43440b2fe8c2038c0e5
Author: Damian Meden <[email protected]>
AuthorDate: Mon Jan 15 09:23:57 2024 +0100
CMake: Make sure pthread is available when checking for some of the library
functions (#10985)
---
CMakeLists.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fa4a21a064..bd242f53cb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -425,6 +425,7 @@ if(HAVE_IOURING AND USE_IOURING)
set(TS_USE_LINUX_IO_URING 1)
endif(HAVE_IOURING AND USE_IOURING)
+list(APPEND CMAKE_REQUIRED_LIBRARIES pthread)
check_symbol_exists(pthread_getname_np pthread.h HAVE_PTHREAD_GETNAME_NP)
check_symbol_exists(pthread_get_name_np pthread.h HAVE_PTHREAD_GET_NAME_NP)
@@ -444,7 +445,7 @@ check_source_compiles(
C "#include <pthread.h>
void main() { pthread_set_name_np(0, \"name\"); }" HAVE_PTHREAD_SET_NAME_NP_2
)
-
+list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES pthread)
# Check ssl functionality
list(APPEND CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
list(APPEND CMAKE_REQUIRED_LIBRARIES ${OPENSSL_SSL_LIBRARY}
${OPENSSL_CRYPTO_LIBRARY})