From f9d47e28b92f0e1ee3182a3a7375b886f3fad2fd Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 18 Oct 2015 02:23:01 +0200 Subject: [PATCH] Fix _aligned_malloc usage --- src/lib/openjp2/opj_malloc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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;