pcsx2|gsdx:linux: Fix posix_memalign

The AddressSanitizer can be used on Linux again. Well, PCSX2 doesn't get
very far when it's used though.
This commit is contained in:
Jonathan Li 2015-09-11 18:16:36 +01:00
parent 0a7eed686c
commit 239306e9a2
2 changed files with 4 additions and 4 deletions

View File

@ -34,8 +34,8 @@ void* __fastcall pcsx2_aligned_malloc(size_t size, size_t align)
#elif defined(__USE_ISOC11) && !defined(ASAN_WORKAROUND) // not supported yet on gcc 4.9
return aligned_alloc(align, size);
#else
void *result=0;
posix_memalign(&result, alignment, size);
void *result = 0;
posix_memalign(&result, align, size);
return result;
#endif
}

View File

@ -111,8 +111,8 @@ void vmfree(void* ptr, size_t size)
void* _aligned_malloc(size_t size, size_t alignment)
{
void* ret;
posix_memalign(&return, a, size);
void *ret = 0;
posix_memalign(&ret, alignment, size);
return ret;
}