diff options
author | Florian Weimer <fweimer@redhat.com> | 2020-03-03 12:15:38 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2020-03-03 12:15:38 +0100 |
commit | 658b5848a827876cc8a5e518749f78429a9970d7 (patch) | |
tree | 1806a65c5756fc6b76c61d126e4399a9fb561ee6 /sysdeps/unix/sysv/linux/getentropy.c | |
parent | d241dee4dda34d36a9e94468ae9dcfe07c6ac060 (diff) | |
download | glibc-658b5848a827876cc8a5e518749f78429a9970d7.tar.gz glibc-658b5848a827876cc8a5e518749f78429a9970d7.tar.xz glibc-658b5848a827876cc8a5e518749f78429a9970d7.zip |
Linux: getrandom syscall number is always available
Due to the built-in tables, __NR_getrandom is always defined. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/unix/sysv/linux/getentropy.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/getentropy.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/sysdeps/unix/sysv/linux/getentropy.c b/sysdeps/unix/sysv/linux/getentropy.c index 5d0b8d10c1..2f3a4e4692 100644 --- a/sysdeps/unix/sysv/linux/getentropy.c +++ b/sysdeps/unix/sysv/linux/getentropy.c @@ -21,7 +21,6 @@ #include <errno.h> #include <unistd.h> -#ifdef __NR_getrandom /* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on success and -1 on failure. */ int @@ -63,11 +62,3 @@ getentropy (void *buffer, size_t length) } return 0; } -#else -int -getentropy (void *buffer, size_t length) -{ - __set_errno (ENOSYS); - return -1; -} -#endif |