Skip to content

Commit 3e54404

Browse files
committed
[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 clangd/clangd#188 Patch by lh123! Differential Revision: https://reviews.llvm.org/D69879
1 parent eabd405 commit 3e54404

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Support/Windows/Threading.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static unsigned __stdcall threadFuncAsync(void *Arg) {
3434
}
3535

3636
static void
37-
llvm_execute_on_thread_impl(_beginthreadex_proc_type ThreadFunc, void *Arg,
37+
llvm_execute_on_thread_impl(unsigned (__stdcall *ThreadFunc)(void *), void *Arg,
3838
llvm::Optional<unsigned> StackSizeInBytes,
3939
JoiningPolicy JP) {
4040
HANDLE hThread = (HANDLE)::_beginthreadex(

0 commit comments

Comments
 (0)