random-util: use ssize_t for getrandom return value
This matches the prototype provided by glibc.
This commit is contained in:
committed by
Yu Watanabe
parent
4b7b73c714
commit
289b41aae7
@@ -78,7 +78,8 @@ static inline int missing_memfd_create(const char *name, unsigned int flags) {
|
||||
/* ======================================================================= */
|
||||
|
||||
#if !HAVE_GETRANDOM
|
||||
static inline int missing_getrandom(void *buffer, size_t count, unsigned flags) {
|
||||
/* glibc says getrandom() returns ssize_t */
|
||||
static inline ssize_t missing_getrandom(void *buffer, size_t count, unsigned flags) {
|
||||
# ifdef __NR_getrandom
|
||||
return syscall(__NR_getrandom, buffer, count, flags);
|
||||
# else
|
||||
|
||||
Reference in New Issue
Block a user