From 4c0122f0ad3bac029c497d791cbdc66a2c845c3a Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Tue, 16 Feb 2021 17:42:01 +0100 Subject: [PATCH] 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/ -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); | ^~~~~~~~~~~ --- newlib/libc/stdlib/aligned_alloc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/newlib/libc/stdlib/aligned_alloc.c b/newlib/libc/stdlib/aligned_alloc.c index feb22c24b..06b3883cf 100644 --- a/newlib/libc/stdlib/aligned_alloc.c +++ b/newlib/libc/stdlib/aligned_alloc.c @@ -28,6 +28,7 @@ #include #include +#include void * aligned_alloc (size_t align, size_t size)