This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] rtems crt0: Add stubs for arc4random.


Patch applied.

-- Jeff J.

----- Original Message -----
> Ping. This patch is necessary so that Autoconf link-time tests can
> detect the arc4random() function on RTEMS.
> 
> On 04/05/16 11:45, Christian Mauderer wrote:
> > From: Christian Mauderer <Christian.Mauderer@embedded-brains.de>
> >
> > ---
> >   newlib/libc/sys/rtems/crt0.c | 5 +++++
> >   1 file changed, 5 insertions(+)
> >
> > diff --git a/newlib/libc/sys/rtems/crt0.c b/newlib/libc/sys/rtems/crt0.c
> > index 3bf7083..1a0a055 100644
> > --- a/newlib/libc/sys/rtems/crt0.c
> > +++ b/newlib/libc/sys/rtems/crt0.c
> > @@ -16,6 +16,7 @@
> >   #include <time.h> /* struct timespec */
> >   #include <unistd.h> /* isatty */
> >   #include <sys/lock.h> /* _Mutex_recursive_Control */
> > +#include <machine/_arc4random.h>
> >   #include <machine/_libatomic.h>
> >   
> >   void rtems_provides_crt0( void ) {}  /* dummy symbol so file always has
> >   one */
> > @@ -66,6 +67,10 @@ RTEMS_STUB(void, _Libatomic_Protect_end(void *ptr,
> > __uint32_t isr_level), { });
> >   RTEMS_STUB(void, _Libatomic_Lock_n(void *ptr, __size_t n), { });
> >   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), { });
> > +RTEMS_STUB(void, _arc4random_getentropy_fail(void), { });
> > +
> >   #if defined(__GNUC__)
> >   /*
> >    * stubs for libstdc++ rtems-threads support functions from
> >    gcc/gthr-rtems.h
> 
> --
> Sebastian Huber, embedded brains GmbH
> 
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax     : +49 89 189 47 41-09
> E-Mail  : sebastian.huber@embedded-brains.de
> PGP     : Public key available on request.
> 
> Diese Nachricht ist keine geschÃftliche Mitteilung im Sinne des EHUG.
> 
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]