public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH/committed/obvious] newlib: xstormy16: add missing string.h include
@ 2022-03-01  6:16 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2022-03-01  6:16 UTC (permalink / raw)
  To: newlib

Some of these functions are using memcpy & memset from string.h but
not including the header leading to implicit declaration warnings.
---
 newlib/libc/machine/xstormy16/tiny-malloc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/newlib/libc/machine/xstormy16/tiny-malloc.c b/newlib/libc/machine/xstormy16/tiny-malloc.c
index 597e389dce7f..e6f67a8867d9 100644
--- a/newlib/libc/machine/xstormy16/tiny-malloc.c
+++ b/newlib/libc/machine/xstormy16/tiny-malloc.c
@@ -271,6 +271,8 @@ free (void *block_p)
 #endif
 
 #ifdef DEFINE_REALLOC
+#include <string.h>
+
 void *
 realloc (void *block_p, size_t sz)
 {
@@ -310,6 +312,8 @@ realloc (void *block_p, size_t sz)
 #endif
 
 #ifdef DEFINE_CALLOC
+#include <string.h>
+
 void *
 calloc (size_t n, size_t elem_size)
 {
@@ -509,6 +513,7 @@ pvalloc (size_t sz)
 
 #ifdef DEFINE_MALLINFO
 #include "malloc.h"
+#include <string.h>
 
 struct mallinfo 
 mallinfo (void)
-- 
2.34.1


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

only message in thread, other threads:[~2022-03-01  6:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-01  6:16 [PATCH/committed/obvious] newlib: xstormy16: add missing string.h include Mike Frysinger

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).