[PATCH v3 5/6] libc/sys/rtems/crt0.c: _arc4random_getentropy_fail should not return
Joel Sherrill <[email protected]> Thu, 16 Apr 2026 16:00:46 -0500
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
GCC now detects that the stub did return. Added while (1) to
address the warning.
---
newlib/libc/sys/rtems/crt0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/newlib/libc/sys/rtems/crt0.c b/newlib/libc/sys/rtems/crt0.c
index 67f9d7302..f9c5ab951 100644
--- a/newlib/libc/sys/rtems/crt0.c
+++ b/newlib/libc/sys/rtems/crt0.c
@@ -73,7 +73,7 @@ RTEMS_STUB(void, _Libatomic_Unlock_n(void *ptr, __size_t n), { });
/* Stubs for routines for arc4random (from <unistd.h> and <machine/_arc4random.h> */
RTEMS_STUB(int, getentropy(void *ptr, __size_t n), { return -1; });
-RTEMS_STUB(void, _arc4random_getentropy_fail(void), { });
+RTEMS_STUB(void, _arc4random_getentropy_fail(void), { while(1) ; });
#if defined(__GNUC__)
/*
--
2.47.3