build: check for SetThreadDescription() at configure time

This commit is contained in:
ViniciusCestarii
2026-08-22 11:06:59 -03:00
parent 58a7869f86
commit bed46bd16c
3 changed files with 11 additions and 2 deletions

View File

@@ -76,6 +76,9 @@
/* Define this symbol if you have posix_fallocate */
#cmakedefine HAVE_POSIX_FALLOCATE 1
/* Define this symbol if you have SetThreadDescription */
#cmakedefine HAVE_SETTHREADDESCRIPTION 1
/* Define this symbol if platform supports unix domain sockets */
#cmakedefine HAVE_SOCKADDR_UN 1

View File

@@ -76,6 +76,10 @@ check_cxx_source_compiles("
" HAVE_STRONG_GETAUXVAL
)
# Check for SetThreadDescription(), which is missing from mingw-w64 headers
# before 12.0.0.
check_cxx_symbol_exists(SetThreadDescription "windows.h" HAVE_SETTHREADDESCRIPTION)
# Check for UNIX sockets.
check_cxx_source_compiles("
#include <sys/socket.h>