random-util: our baseline includes getrandom() (v3.17) now
Plus, linux/random.h never defined getrandom(), hence remove the custom machinery for sys/random.h vs linux/random.h in favor of single HAVE_GETRANDOM.
This commit is contained in:
@@ -91,12 +91,7 @@ static inline int missing_memfd_create(const char *name, unsigned int flags) {
|
||||
#if !HAVE_GETRANDOM
|
||||
/* 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
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
# endif
|
||||
}
|
||||
|
||||
# define getrandom missing_getrandom
|
||||
|
||||
Reference in New Issue
Block a user