rand_unix.c: assimilate syscall_random() with getrandom(2)
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Fri, 17 Aug 2018 21:29:19 +0000 (23:29 +0200)
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Sun, 19 Aug 2018 10:44:05 +0000 (12:44 +0200)
commit9b5f1c8fd81c01bbaa0aeca0f97e65fee4ab9745
tree8353926e159c00a96a79b11f4198b946f44a3c7d
parent8e5da579c131c493c91efeffe87b0a5cb398fee0
rand_unix.c: assimilate syscall_random() with getrandom(2)

Change return value type to ssize_t and ensure that a negative value
is returned only if a corresponding errno is set.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6990)
crypto/rand/rand_unix.c