4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-02 04:20:28 +08:00

Include malloc.h in libc/stdlib/aligned_alloc.c

Without this, for a bare-iron/simulator target such as cris-elf,
you'll see, at newlib build time:

/x/gccobj/./gcc/xgcc -B/x/gccobj/./gcc/ <many options elided> -c -o lib_a-aligned_alloc.o \
 `test -f 'aligned_alloc.c' || echo '/y/newlib/libc/stdlib/'`aligned_alloc.c
/y/newlib/libc/stdlib/aligned_alloc.c: In function 'aligned_alloc':
/y/newlib/libc/stdlib/aligned_alloc.c:35:10: warning: implicit declaration of function \
 '_memalign_r' [-Wimplicit-function-declaration]
   35 |   return _memalign_r (_REENT, align, size);
      |          ^~~~~~~~~~~
This commit is contained in:
Hans-Peter Nilsson 2021-02-16 17:42:01 +01:00 committed by Ken Brown
parent 2bc370afba
commit 4c0122f0ad

View File

@ -28,6 +28,7 @@
#include <reent.h> #include <reent.h>
#include <stdlib.h> #include <stdlib.h>
#include <malloc.h>
void * void *
aligned_alloc (size_t align, size_t size) aligned_alloc (size_t align, size_t size)