--- openssl-1.1.1-pre6/crypto/rand/rand_unix.c.ori 2018-05-22 14:06:03.490771549 +0200 +++ openssl-1.1.1-pre6/crypto/rand/rand_unix.c 2018-05-22 14:14:33.133237079 +0200 @@ -173,6 +173,26 @@ # define OPENSSL_HAVE_GETRANDOM # endif +# if defined(__linux) +# include +#if !defined(SYS_getrandom) +#if !defined(__NR_getrandom) +#if defined(__powerpc__) || defined(__powerpc64__) +#define __NR_getrandom 236 +#elif defined(__sparc__) || defined(__sparc64__) +#define __NR_getrandom 347 +#elif defined(__x86_64__) +#define __NR_getrandom 318 +#elif defined (__i386__) +#define __NR_getrandom 355 +#elif defined (__s390__) || defined(__s390x__) +#define __NR_getrandom 249 +#endif /* $arch */ +#endif /* __NR_getrandom */ +# define SYS_getrandom __NR_getrandom +#endif +#endif + # if defined(OPENSSL_HAVE_GETRANDOM) # include # endif