Skip to content

Commit

Permalink
cmake/config: set HAVE_THREADS only if threads.h (baresip#1005)
Browse files Browse the repository at this point in the history
  • Loading branch information
sreimers authored Nov 16, 2023
1 parent a7a6c57 commit ebdf9d7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmake/re-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ else()
set(Backtrace_LIBRARIES)
endif()

check_function_exists(thrd_create HAVE_THREADS)
check_function_exists(thrd_create HAVE_THREADS_FUN)
check_include_file(threads.h HAVE_THREADS_H)
if(HAVE_THREADS_FUN AND HAVE_THREADS_H)
set(HAVE_THREADS CACHE BOOL true)
endif()
if(HAVE_THREADS)
list(APPEND RE_DEFINITIONS HAVE_THREADS)
endif()
Expand Down

0 comments on commit ebdf9d7

Please sign in to comment.