diff --git a/osdep/threads-win32.h b/osdep/threads-win32.h index ec90fe9387282..24f8129eb81ca 100644 --- a/osdep/threads-win32.h +++ b/osdep/threads-win32.h @@ -204,7 +204,7 @@ static inline void mp_thread_set_name(const char *name) HMODULE kernel32 = GetModuleHandleW(L"kernel32.dll"); if (!kernel32) return; - pSetThreadDescription = (void *) GetProcAddress(kernel32, "SetThreadDescription"); + pSetThreadDescription = (__typeof__(pSetThreadDescription)) GetProcAddress(kernel32, "SetThreadDescription"); if (!pSetThreadDescription) return; #else