diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2016-03-26 17:12:52 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2016-03-26 17:20:27 +0900 |
| commit | d64089632e82a2548752c7a6baaa68365a795a74 (patch) | |
| tree | 57fc7b85a8c1290975d58fa4761b04a7695bf7e3 /src/getrandom_linux.c | |
| parent | c81b1321122e8509b55c94c0cbca0d8d6d319f0c (diff) | |
| parent | a7cd943a06b1a5ff4515b57060b84037f8d01f9f (diff) | |
Merge branch 'master' into random-webseeding
Diffstat (limited to 'src/getrandom_linux.c')
| -rw-r--r-- | src/getrandom_linux.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/getrandom_linux.c b/src/getrandom_linux.c index 691c5d5f..d39b9d70 100644 --- a/src/getrandom_linux.c +++ b/src/getrandom_linux.c @@ -45,7 +45,8 @@ #include "config.h" #include "getrandom_linux.h" -int getrandom_linux(void *buf, size_t buflen) { +int getrandom_linux(void* buf, size_t buflen) +{ int rv = 0; uint8_t* p = buf; @@ -57,7 +58,7 @@ int getrandom_linux(void *buf, size_t buflen) { #ifdef HAVE_GETRANDOM /* libc already has support */ read = getrandom(p, buflen, 0); -#else // HAVE_GETRANDOM +#else // HAVE_GETRANDOM /* libc has no support, make the syscall ourselves */ read = syscall(SYS_getrandom, p, buflen, 0); /* Some libc impl. might mess -ERESTART up */ |
