From: mayeut Date: Sun, 18 Oct 2015 00:23:01 +0000 (+0200) Subject: Fix _aligned_malloc usage X-Git-Tag: v2.1.1~22^2~25^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f9d47e28b92f0e1ee3182a3a7375b886f3fad2fd;p=openjpeg Fix _aligned_malloc usage --- diff --git a/src/lib/openjp2/opj_malloc.c b/src/lib/openjp2/opj_malloc.c index beb887bc..9c1a6cc8 100644 --- a/src/lib/openjp2/opj_malloc.c +++ b/src/lib/openjp2/opj_malloc.c @@ -30,14 +30,13 @@ * POSSIBILITY OF SUCH DAMAGE. */ #define OPJ_SKIP_POISON -#include "opj_malloc.h" -#include "opj_config_private.h" +#include "opj_includes.h" #include #include #include #include -static inline void *opj_aligned_alloc_n(size_t alignment, size_t size) +static INLINE void *opj_aligned_alloc_n(size_t alignment, size_t size) { void* ptr; @@ -62,14 +61,14 @@ static inline void *opj_aligned_alloc_n(size_t alignment, size_t size) ptr = memalign( alignment, size ); /* _MSC_VER */ #elif defined(HAVE__ALIGNED_MALLOC) - ptr = _aligned_malloc( alignment, size ); + ptr = _aligned_malloc(size, alignment); #else /* TODO: _mm_malloc(x,y) */ #error missing aligned alloc function #endif return ptr; } -static inline void *opj_aligned_realloc_n(void *ptr, size_t alignment, size_t new_size) +static INLINE void *opj_aligned_realloc_n(void *ptr, size_t alignment, size_t new_size) { void *r_ptr;