FindThreads: Add pthread_cancel to program to test for pthreads in libc
When using ThreadSanitizer our existing CMAKE_HAVE_LIBC_PTHREAD test
program links using symbols from the tsan library. Among the symbols
not provided by that library, pthread_cancel()
seems to be the less
risky symbol to add to the check.
Fixes: #19981 (closed)
Topic-rename: FindThreads-tsan
Edited by Brad King