public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] newlib: Add missing prototype for _getentropy
@ 2023-09-25 18:37 Torbjörn SVENSSON
  2023-09-25 22:21 ` Jeff Johnston
  0 siblings, 1 reply; 2+ messages in thread
From: Torbjörn SVENSSON @ 2023-09-25 18:37 UTC (permalink / raw)
  To: newlib; +Cc: Torbjörn SVENSSON

Ok for master?

---

Fixes compile warnings like:

.../newlib/libc/reent/getentropyr.c: In function '_getentropy_r':
.../newlib/libc/reent/getentropyr.c:48:14: warning: implicit declaration of function '_getentropy'; did you mean 'getentropy'? [-Wimplicit-function-declaration]
   48 |   if ((ret = _getentropy (buf, buflen)) == -1 && errno != 0)
      |              ^~~~~~~~~~~
      |              getentropy

Contributed by STMicroelectronics

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
---
 newlib/libc/include/sys/unistd.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h
index 807407700..25532251c 100644
--- a/newlib/libc/include/sys/unistd.h
+++ b/newlib/libc/include/sys/unistd.h
@@ -262,6 +262,7 @@ void *  _sbrk (ptrdiff_t __incr);
 int     _unlink (const char *__path);
 _READ_WRITE_RETURN_TYPE _write (int __fd, const void *__buf, size_t __nbyte);
 int     _execve (const char *__path, char * const __argv[], char * const __envp[]);
+int     _getentropy (void *, size_t);
 #endif
 
 #if !defined(__INSIDE_CYGWIN__)
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-25 22:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-25 18:37 [PATCH] newlib: Add missing prototype for _getentropy Torbjörn SVENSSON
2023-09-25 22:21 ` Jeff Johnston

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