mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
OpenBSD has getentropy, but no sys/random.h
https://man.openbsd.org/getentropy Try to fix https://rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20210118T023008Z.fail.html.gz ``` compiling random.c random.c:53:11: fatal error: 'sys/random.h' file not found # include <sys/random.h> ^~~~~~~~~~~~~~ 1 error generated. ```
This commit is contained in:
parent
bf640bbf8c
commit
6abf393e8f
2 changed files with 4 additions and 1 deletions
|
@ -1195,6 +1195,7 @@ AC_CHECK_HEADERS(sys/ioctl.h)
|
|||
AC_CHECK_HEADERS(sys/mkdev.h)
|
||||
AC_CHECK_HEADERS(sys/param.h)
|
||||
AC_CHECK_HEADERS(sys/prctl.h)
|
||||
AC_CHECK_HEADERS(sys/random.h)
|
||||
AC_CHECK_HEADERS(sys/resource.h)
|
||||
AC_CHECK_HEADERS(sys/select.h)
|
||||
AC_CHECK_HEADERS(sys/sendfile.h)
|
||||
|
|
4
random.c
4
random.c
|
@ -50,7 +50,9 @@
|
|||
#endif
|
||||
|
||||
#if defined HAVE_GETRANDOM || defined HAVE_GETENTROPY
|
||||
# include <sys/random.h>
|
||||
# if defined(HAVE_SYS_RANDOM_H)
|
||||
# include <sys/random.h>
|
||||
# endif
|
||||
#elif defined __linux__ && defined __NR_getrandom
|
||||
# include <linux/random.h>
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue