diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake index 64576ebf56..85174d93d6 100644 --- a/Modules/FindThreads.cmake +++ b/Modules/FindThreads.cmake @@ -63,6 +63,7 @@ int main(void) pthread_t thread; pthread_create(&thread, NULL, test_func, NULL); pthread_detach(thread); + pthread_cancel(thread); pthread_join(thread, NULL); pthread_atfork(NULL, NULL, NULL); pthread_exit(NULL);