diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2019-08-17 13:22:07 +0200 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2019-08-19 07:06:56 +0200 |
commit | 31dd6414a0170214a8819a15f23cb9a5f3ee55d1 (patch) | |
tree | 9a158b87171ad685da5405beed74639c8b0c2bbc /crypto/rand | |
parent | efc62e661714a4bba3040a12da4e4a0df8855283 (diff) |
Add a fallback definition for __NR_getrandom for ARM linux
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9619)
(cherry picked from commit 24d932ec842bc5fdbd5e9b519cecf15a56bc74e6)
Diffstat (limited to 'crypto/rand')
-rw-r--r-- | crypto/rand/rand_unix.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c index 114c40b184..5a4d28166d 100644 --- a/crypto/rand/rand_unix.c +++ b/crypto/rand/rand_unix.c @@ -275,6 +275,13 @@ static ssize_t sysctl_random(char *buf, size_t buflen) # endif # if defined(OPENSSL_RAND_SEED_GETRANDOM) + +# if defined(__linux) && !defined(__NR_getrandom) +# if defined(__arm__) && defined(__NR_SYSCALL_BASE) +# define __NR_getrandom (__NR_SYSCALL_BASE+384) +# endif +# endif + /* * syscall_random(): Try to get random data using a system call * returns the number of bytes returned in buf, or < 0 on error. |