diff --git a/StepmaniaCore.cmake b/StepmaniaCore.cmake index 6e33ee2531..6c94ae3681 100644 --- a/StepmaniaCore.cmake +++ b/StepmaniaCore.cmake @@ -231,6 +231,9 @@ find_package(Iconv) find_package(Threads) if (${Threads_FOUND}) set(HAS_PTHREAD TRUE) + list(APPEND CMAKE_REQUIRED_LIBRARIES pthread) + check_symbol_exists(pthread_mutex_timedlock pthread.h HAVE_PTHREAD_MUTEX_TIMEDLOCK) + check_symbol_exists(pthread_cond_timedwait pthread.h HAVE_PTHREAD_COND_TIMEDWAIT) else() set(HAS_PTHREAD FALSE) endif() diff --git a/src/config.in.hpp b/src/config.in.hpp index a8fdd07910..44be021359 100644 --- a/src/config.in.hpp +++ b/src/config.in.hpp @@ -93,6 +93,12 @@ /* Defined to 1 if the underlying system provides the posix_fadvise function. */ #cmakedefine HAVE_POSIX_FADVISE 1 +/* Defined to 1 if the underlying system provides the pthread_mutex_timedlock function. */ +#cmakedefine HAVE_PTHREAD_MUTEX_TIMEDLOCK 1 + +/* Defined to 1 if the underlying system provides the pthread_cond_timedwait function. */ +#cmakedefine HAVE_PTHREAD_COND_TIMEDWAIT 1 + /* Provide a fallback if intptr_t is not defined. */ #cmakedefine HAVE_SIZEOF_INTPTR_T 1 #if !defined(HAVE_SIZEOF_INTPTR_T)