Fix Linux Builds

This commit is contained in:
Michael Flaherty 2019-04-22 02:17:03 -07:00 committed by Headline
parent 8fb4b0af6a
commit b22aea23b0
2 changed files with 6 additions and 2 deletions

View File

@ -10,6 +10,10 @@ for arch in SM.archs:
os.path.join(builder.sourcePath, 'sourcepawn', 'vm'), os.path.join(builder.sourcePath, 'sourcepawn', 'vm'),
os.path.join(builder.sourcePath, 'sourcepawn', 'vm', 'x86'), os.path.join(builder.sourcePath, 'sourcepawn', 'vm', 'x86'),
] ]
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
binary.compiler.cxxflags += ['-Wno-invalid-offsetof']
binary.compiler.defines += ['META_NO_HL2SDK'] binary.compiler.defines += ['META_NO_HL2SDK']
binary.sources += [ binary.sources += [
'extension.cpp', 'extension.cpp',

View File

@ -203,7 +203,7 @@ SourceHook::PassInfo::PassType GetParamTypePassType(HookParamType type);
#ifndef WIN32 #ifndef WIN32
static void *GenerateThunk(ReturnType type) static void *GenerateThunk(ReturnType type)
{ {
sp::MacroAssemblerX86 masm; sp::MacroAssembler masm;
static const size_t kStackNeeded = (2) * 4; // 2 args max static const size_t kStackNeeded = (2) * 4; // 2 args max
static const size_t kReserve = ke::Align(kStackNeeded+8, 16)-8; static const size_t kReserve = ke::Align(kStackNeeded+8, 16)-8;