mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-26 22:38:30 +00:00
Make some style fixes to prng code
This commit is contained in:
parent
dab6d7a345
commit
98861b23fc
3 changed files with 9 additions and 5 deletions
|
@ -21,6 +21,7 @@
|
|||
#include "libc/dce.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/intrin/strace.h"
|
||||
#include "libc/runtime/syslib.internal.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
int sys_getentropy(void *, size_t) asm("sys_getrandom");
|
||||
|
@ -39,6 +40,8 @@ int getentropy(void *p, size_t n) {
|
|||
rc = eio();
|
||||
} else if ((!p && n)) {
|
||||
rc = efault();
|
||||
} else if (IsXnuSilicon()) {
|
||||
rc = __syslib->__getentropy(p, n);
|
||||
} else if (IsXnu() || IsOpenbsd()) {
|
||||
rc = sys_getentropy(p, n);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue