From f1a76cbc642023260706efaa11cab407ea3e93be Mon Sep 17 00:00:00 2001 From: Xinyue Lu Date: Tue, 3 Sep 2019 01:15:10 -0400 Subject: [PATCH] Fix ICL compiling issue --- src/compiler_compat.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/compiler_compat.h b/src/compiler_compat.h index a2c427b..44f4b19 100644 --- a/src/compiler_compat.h +++ b/src/compiler_compat.h @@ -27,6 +27,13 @@ static inline void* _aligned_malloc(size_t size, size_t alignment) #define _aligned_free free #else #include + // ICL complains about unresolved external symbol + #if __INTEL_COMPILER && !_WIN64 + __forceinline void* _InterlockedCompareExchangePointer( + void* volatile *Destination, void* Exchange, void* Comperand) { + return (void*) _InterlockedCompareExchange((long volatile *) Destination, (long) Exchange, (long) Comperand); + } + #endif #endif