Changeset 9ea8664 in rtems-libbsd


Ignore:
Timestamp:
Jun 26, 2018, 11:54:08 AM (10 months ago)
Author:
Christian Mauderer <christian.mauderer@…>
Branches:
647dd08ae2aa69b935c2847ea450fb824322ecae, c6261f97870562d4c797cfb1ff1ba0affb85a916
Children:
879eaa7
Parents:
9efc650
git-author:
Christian Mauderer <christian.mauderer@…> (06/26/18 11:54:08)
git-committer:
Christian Mauderer <christian.mauderer@…> (08/01/18 07:55:27)
Message:

random: Implement read_random via getentropy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/sys/random.h

    r9efc650 r9ea8664  
    5151        return (0);
    5252}
     53#ifndef __rtems__
    5354static __inline u_int
    5455read_random(void *a __unused, u_int b __unused)
     
    5657        return (0);
    5758}
     59#else /* __rtems__ */
     60#include <unistd.h>
     61static __inline u_int
     62read_random(void *ptr, u_int n)
     63{
     64        getentropy(ptr, n);
     65        return (n);
     66}
     67#endif /* __rtems__ */
    5868#endif
    5969
Note: See TracChangeset for help on using the changeset viewer.