Skip to content

Commit 660a7ec

Browse files
watologo1Thomas Renninger
authored and
Thomas Renninger
committedFeb 24, 2023
Add pthread to be linked against
For some reason this was not needed when I built in latest Tumbleweed env. It seems as if phtread code moved into glibc or something more general, but this helped to build against Leap 15.4 and Tumbleweed still built successfully.
1 parent f3bca05 commit 660a7ec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ if(OPENSSL_FOUND)
7070
target_link_libraries(redfish crypto)
7171
endif()
7272

73+
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
74+
set(THREADS_PREFER_PTHREAD_FLAG ON)
75+
target_link_libraries(redfish Threads::Threads)
7376

7477
add_executable(redfishtest "${CMAKE_CURRENT_SOURCE_DIR}/examples/test.c")
7578
target_link_libraries(redfishtest redfish)

0 commit comments

Comments
 (0)