diff --git a/src/scripting/vm/vmexec.cpp b/src/scripting/vm/vmexec.cpp index 252371c40..ad54ae255 100644 --- a/src/scripting/vm/vmexec.cpp +++ b/src/scripting/vm/vmexec.cpp @@ -149,7 +149,11 @@ VMExec_Checked::Exec // Note: If the VM is being used in multiple threads, this should be declared as thread_local. // ZDoom doesn't need this at the moment so this is disabled. +#ifndef __MINGW32__ thread_local VMFrameStack GlobalVMStack; +#else +VMFrameStack GlobalVMStack; +#endif //=========================================================================== diff --git a/src/scripting/vm/vmintern.h b/src/scripting/vm/vmintern.h index e79a2360d..c66489c08 100644 --- a/src/scripting/vm/vmintern.h +++ b/src/scripting/vm/vmintern.h @@ -433,7 +433,11 @@ void VMFillParams(VMValue *params, VMFrame *callee, int numparam); void VMDumpConstants(FILE *out, const VMScriptFunction *func); void VMDisasm(FILE *out, const VMOP *code, int codesize, const VMScriptFunction *func); +#ifndef __MINGW32__ extern thread_local VMFrameStack GlobalVMStack; +#else +extern VMFrameStack GlobalVMStack; +#endif typedef std::pair FTypeAndOffset;