osx : fix syscalls

This commit is contained in:
hymei
2022-06-05 01:13:13 +03:00
committed by nillerusr
parent c7308906d1
commit 3291cdf978
16 changed files with 92 additions and 32 deletions
+28 -1
View File
@@ -27,6 +27,9 @@
// memdbgon -must- be the last include file in a .cpp file.
#include "tier0/memdbgon.h"
// MoeMod : ARM Mac doesnt need this workround
#if (defined(__i386__) || defined(__x86_64__))
IntelGLMallocWorkaround* IntelGLMallocWorkaround::s_pWorkaround = NULL;
void *IntelGLMallocWorkaround::ZeroingAlloc(size_t size)
@@ -68,4 +71,28 @@ bool IntelGLMallocWorkaround::Enable()
}
return true;
}
}
#else
IntelGLMallocWorkaround* IntelGLMallocWorkaround::s_pWorkaround = NULL;
void *IntelGLMallocWorkaround::ZeroingAlloc(size_t size)
{
return nullptr;
}
IntelGLMallocWorkaround* IntelGLMallocWorkaround::Get()
{
if (!s_pWorkaround)
{
s_pWorkaround = new IntelGLMallocWorkaround();
}
return s_pWorkaround;
}
bool IntelGLMallocWorkaround::Enable()
{
return true;
}
#endif