View | Details | Raw Unified | Return to bug 199480 | Differences between
and this patch

Collapse All | Expand All

(-)lua52/files/patch-src__lstate.c (+15 lines)
Line 0 Link Here
1
--- src/lstate.c.orig	2014-11-02 21:33:33.000000000 +0200
2
+++ src/lstate.c	2015-04-16 14:22:07.000000000 +0300
3
@@ -43,8 +43,12 @@
4
 /*
5
 ** a macro to help the creation of a unique random seed when a state is
6
 ** created; the seed is used to randomize hashes.
7
 */
8
+#define __BSD_VISIBLE		1
9
+#include <stdlib.h>
10
+#define luai_makeseed()		cast(unsigned int, arc4random())
11
+
12
 #if !defined(luai_makeseed)
13
 #include <time.h>
14
 #define luai_makeseed()		cast(unsigned int, time(NULL))
15
 #endif
(-)lua53/files/patch-src__lstate.c (+15 lines)
Line 0 Link Here
1
--- src/lstate.c.orig	2014-11-02 21:33:33.000000000 +0200
2
+++ src/lstate.c	2015-04-16 14:22:07.000000000 +0300
3
@@ -43,8 +43,12 @@
4
 /*
5
 ** a macro to help the creation of a unique random seed when a state is
6
 ** created; the seed is used to randomize hashes.
7
 */
8
+#define __BSD_VISIBLE		1
9
+#include <stdlib.h>
10
+#define luai_makeseed()		cast(unsigned int, arc4random())
11
+
12
 #if !defined(luai_makeseed)
13
 #include <time.h>
14
 #define luai_makeseed()		cast(unsigned int, time(NULL))
15
 #endif

Return to bug 199480