Fix compilation issue reported with GLIBC 2.12 (RHEL 6.9)

Change-Id: I770b72ba1d61475a76aa72d0c52ebfb380db6019


[ROCm/ROCR-Runtime commit: 9ee0108e58]
This commit is contained in:
hthangir
2017-07-27 17:30:26 -05:00
committed by Hari Thangirala
parent 9443b47a53
commit ea88523fc7
+7
View File
@@ -65,7 +65,14 @@ typedef uint64_t uint64;
#define __ALIGNED__(x) __attribute__((aligned(x)))
static __forceinline void* _aligned_malloc(size_t size, size_t alignment) {
#ifdef _ISOC11_SOURCE
return aligned_alloc(alignment, size);
#else
void *mem = NULL;
if (NULL != posix_memalign(&mem, alignment, size))
return NULL;
return mem;
#endif
}
static __forceinline void _aligned_free(void* ptr) { return free(ptr); }
#elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))