LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File php7-getrandom-test.patch of Package php7 (Project home:mayflower:php7.0_based)

Index: php-7.0.10/ext/standard/random.c
===================================================================
--- php-7.0.10.orig/ext/standard/random.c
+++ php-7.0.10/ext/standard/random.c
@@ -94,7 +94,7 @@ PHPAPI int php_random_bytes(void *bytes,
 	}
 #elif HAVE_DECL_ARC4RANDOM_BUF && ((defined(__OpenBSD__) && OpenBSD >= 201405) || (defined(__NetBSD__) && __NetBSD_Version__ >= 700000001))
 	arc4random_buf(bytes, size);
-#elif HAVE_DECL_GETRANDOM
+#elif defined(SYS_getrandom)
 	/* Linux getrandom(2) syscall */
 	size_t read_bytes = 0;
 	size_t amount_to_read = 0;