This is an automated email from the ASF dual-hosted git repository. rmiddleton pushed a commit to branch LOGCXX-431 in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 3687a8b253a196786b45b506b03399fc530fecd9 Author: Robert Middleton <[email protected]> AuthorDate: Fri Aug 20 22:33:44 2021 -0400 Fix pthread name test for linux --- src/cmake/pthread/log4cxx-pthread.cmake | 3 ++- src/cmake/pthread/test-pthread.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cmake/pthread/log4cxx-pthread.cmake b/src/cmake/pthread/log4cxx-pthread.cmake index aa3647b..d4a5272 100644 --- a/src/cmake/pthread/log4cxx-pthread.cmake +++ b/src/cmake/pthread/log4cxx-pthread.cmake @@ -1,5 +1,6 @@ include(FindThreads) try_compile(PTHREAD_SETNAME_NP_FOUND "${CMAKE_BINARY_DIR}/pthread-compile-tests" - "${CMAKE_CURRENT_LIST_DIR}/test-pthread.cpp") + "${CMAKE_CURRENT_LIST_DIR}/test-pthread.cpp" + LINK_LIBRARIES Threads::Threads ) diff --git a/src/cmake/pthread/test-pthread.cpp b/src/cmake/pthread/test-pthread.cpp index f30cd1a..73f453c 100644 --- a/src/cmake/pthread/test-pthread.cpp +++ b/src/cmake/pthread/test-pthread.cpp @@ -2,5 +2,5 @@ int main(){ pthread_t tid; - pthread_set_name_np(tid, "name"); + pthread_setname_np(tid, "name"); }
