Using getrandom() libc interface, SYS_getrandom fixes.
The interface is available since Glibc 2.25, and FreeBSD 12.0.
This commit is contained in:
@@ -32,10 +32,6 @@
|
||||
#include <malloc.h> /* malloc_usable_size(). */
|
||||
#include <sys/syscall.h> /* syscall(SYS_gettid). */
|
||||
|
||||
#if (NXT_GETRANDOM)
|
||||
#include <linux/random.h> /* getrandom(). */
|
||||
#endif
|
||||
|
||||
#if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 4)
|
||||
/*
|
||||
* POSIX semaphores using NPTL atomic/futex operations
|
||||
@@ -234,6 +230,12 @@
|
||||
#include <sys/sendfile.h>
|
||||
#endif
|
||||
|
||||
#if (NXT_HAVE_GETRANDOM)
|
||||
#include <sys/random.h> /* getrandom(). */
|
||||
#elif (NXT_HAVE_LINUX_SYS_GETRANDOM)
|
||||
#include <linux/random.h> /* SYS_getrandom. */
|
||||
#endif
|
||||
|
||||
|
||||
#if (NXT_TEST_BUILD)
|
||||
#include <nxt_test_build.h>
|
||||
|
||||
Reference in New Issue
Block a user