link libpocl-devices-pthread.so with -pthread
@@ -28,5 +28,5 @@ if(MSVC)
endif(MSVC)
add_pocl_device_library(pocl-devices-pthread pocl-pthread.h pthread.c pthread_scheduler.c pthread_utils.c)
if(ENABLE_LOADABLE_DRIVERS)
-target_link_libraries(pocl-devices-pthread PRIVATE pocl-devices-basic)
+target_link_libraries(pocl-devices-pthread PRIVATE pocl-devices-basic ${PTHREAD_LIBRARY})
endif()
