public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Include malloc.h in libc/stdlib/aligned_alloc.c
@ 2021-02-18  1:06 Hans-Peter Nilsson
  0 siblings, 0 replies; only message in thread
From: Hans-Peter Nilsson @ 2021-02-18  1:06 UTC (permalink / raw)
  To: newlib-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=c1a565c3966c7a13a13e2c73b49e4ed4c21f4d0c

commit c1a565c3966c7a13a13e2c73b49e4ed4c21f4d0c
Author: Hans-Peter Nilsson <hp@axis.com>
Date:   Tue Feb 16 17:42:01 2021 +0100

    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);
          |          ^~~~~~~~~~~

Diff:
---
 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 <reent.h>
 #include <stdlib.h>
+#include <malloc.h>
 
 void *
 aligned_alloc (size_t align, size_t size)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-18  1:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-18  1:06 [newlib-cygwin] Include malloc.h in libc/stdlib/aligned_alloc.c Hans-Peter Nilsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).