Re: [PATCH v3 5/6] libc/sys/rtems/crt0.c: _arc4random_getentropy_fail should not return
Corinna Vinschen <[email protected]> Fri, 17 Apr 2026 13:29:22 +0200
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
Hi Joel,
this patch doesn't really belong to this series, right?
Corinna
On Apr 16 16:00, Joel Sherrill wrote:
> 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