headers: Add missing declaration for __mingw_aligned_offset_malloc() There is already declaration for msvcrt _aligned_offset_malloc() function, so add export also declaration for mingw __mingw_aligned_offset_malloc() function. At the same time, remove also uneeded declaration of this function from mingw-w64-crt/misc/mingw-aligned-malloc.c file and use the new one from malloc.h. Signed-off-by: Martin Storsjö <martin@martin.st>
diff --git a/mingw-w64-crt/misc/mingw-aligned-malloc.c b/mingw-w64-crt/misc/mingw-aligned-malloc.c index ca5f866..5029b60 100644 --- a/mingw-w64-crt/misc/mingw-aligned-malloc.c +++ b/mingw-w64-crt/misc/mingw-aligned-malloc.c
@@ -18,9 +18,6 @@ #include <stdint.h> /* uintptr_t */ #include <string.h> /* memmove */ -/* Forward declarations: */ -void *__mingw_aligned_offset_malloc (size_t, size_t, size_t); - #define NOT_POWER_OF_TWO(n) (((n) & ((n) - 1))) #define UI(p) ((uintptr_t) (p)) #define CP(p) ((char *) p)
diff --git a/mingw-w64-headers/crt/malloc.h b/mingw-w64-headers/crt/malloc.h index 9c498c2..cc72d4c 100644 --- a/mingw-w64-headers/crt/malloc.h +++ b/mingw-w64-headers/crt/malloc.h
@@ -131,6 +131,7 @@ void * __mingw_aligned_malloc (size_t _Size, size_t _Alignment); void __mingw_aligned_free (void *_Memory); void * __mingw_aligned_offset_realloc (void *_Memory, size_t _Size, size_t _Alignment, size_t _Offset); +void * __mingw_aligned_offset_malloc (size_t, size_t, size_t); void * __mingw_aligned_realloc (void *_Memory, size_t _Size, size_t _Offset); #if defined(__x86_64__) || defined(__i386__)