1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

[Support] fix mingw-w64 build

Older versions of Mingw-w64 do not define _beginthreadex_proc_type,
so we replace it with `unsigned (__stdcall *ThreadFunc)(void *)`.

Fixes https://github.com/clangd/clangd/issues/188

Patch by lh123!

Differential Revision: https://reviews.llvm.org/D69879
This commit is contained in:
Ilya Biryukov 2019-11-06 14:25:33 +01:00
parent 1556de2854
commit 9f476ae4bb

View File

@ -34,7 +34,7 @@ static unsigned __stdcall threadFuncAsync(void *Arg) {
}
static void
llvm_execute_on_thread_impl(_beginthreadex_proc_type ThreadFunc, void *Arg,
llvm_execute_on_thread_impl(unsigned (__stdcall *ThreadFunc)(void *), void *Arg,
llvm::Optional<unsigned> StackSizeInBytes,
JoiningPolicy JP) {
HANDLE hThread = (HANDLE)::_beginthreadex(