diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2021-02-16 17:42:01 +0100 |
---|---|---|
committer | Hans-Peter Nilsson <hp@bitrange.com> | 2021-02-18 02:05:47 +0100 |
commit | c1a565c3966c7a13a13e2c73b49e4ed4c21f4d0c (patch) | |
tree | bf5ceb6432be2580060cceb63d3ac32f83f8e853 | |
parent | ff4440fcf7687d9af05f4c2fcb163fca5b2167f9 (diff) | |
download | newlib-c1a565c3966c7a13a13e2c73b49e4ed4c21f4d0c.zip newlib-c1a565c3966c7a13a13e2c73b49e4ed4c21f4d0c.tar.gz newlib-c1a565c3966c7a13a13e2c73b49e4ed4c21f4d0c.tar.bz2 |
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);
| ^~~~~~~~~~~
-rw-r--r-- | newlib/libc/stdlib/aligned_alloc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/newlib/libc/stdlib/aligned_alloc.c b/newlib/libc/stdlib/aligned_alloc.c index feb22c2..06b3883 100644 --- a/newlib/libc/stdlib/aligned_alloc.c +++ b/newlib/libc/stdlib/aligned_alloc.c @@ -28,6 +28,7 @@ #include <reent.h> #include <stdlib.h> +#include <malloc.h> void * aligned_alloc (size_t align, size_t size) |