Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.1:Rings:1-MinimalX
apr
apr-use-getrandom.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File apr-use-getrandom.patch of Package apr
--- apr-1.5.1.orig/misc/unix/rand.c +++ apr-1.5.1/misc/unix/rand.c @@ -43,6 +43,9 @@ #include <sys/uuid.h> #endif +#include <sys/syscall.h> +#include <linux/random.h> + #ifndef SHUT_RDWR #define SHUT_RDWR 2 #endif @@ -89,6 +92,12 @@ APR_DECLARE(apr_status_t) apr_generate_r { #ifdef DEV_RANDOM +#ifdef SYS_getrandom + int r = TEMP_FAILURE_RETRY(syscall(SYS_getrandom, buf, length, GRND_NONBLOCK)); + if(r != -1 && r == length) + return APR_SUCCESS; + /* If this fails for whatever reason..fallback to the old ways.. */ +#endif int fd = -1; /* On BSD/OS 4.1, /dev/random gives out 8 bytes at a time, then
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor