compat CHANGE support for systems without pthread_mutex_timedlock()
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dbbba9e..6a2d605 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -105,12 +105,10 @@
 find_package(Threads REQUIRED)
 target_link_libraries(netconf2 ${CMAKE_THREAD_LIBS_INIT})
 
-# check availability of spinlock
+# check availability for some pthread functions
 set(CMAKE_REQUIRED_LIBRARIES pthread)
 check_function_exists(pthread_spin_lock HAVE_SPINLOCK)
-if (HAVE_SPINLOCK)
-	set(DEFINE_HAVE_SPINLOCK "#define HAVE_SPINLOCK")
-endif()
+check_function_exists(pthread_mutex_timedlock HAVE_PTHREAD_MUTEX_TIMEDLOCK)
 
 # dependencies - libssh
 if(ENABLE_SSH)