patch-src_lmathlib_c 573 B

123456789101112131415161718
  1. $OpenBSD: patch-src_lmathlib_c,v 1.1.1.1 2015/01/14 20:06:36 jturner Exp $
  2. --- src/lmathlib.c.orig Mon Jan 12 14:06:55 2015
  3. +++ src/lmathlib.c Mon Jan 12 14:07:08 2015
  4. @@ -26,11 +26,11 @@
  5. #if !defined(l_rand) /* { */
  6. #if defined(LUA_USE_POSIX)
  7. #define l_rand() random()
  8. -#define l_srand(x) srandom(x)
  9. +#define l_srand(x) srandom_deterministic(x)
  10. #define L_RANDMAX 2147483647 /* (2^31 - 1), following POSIX */
  11. #else
  12. #define l_rand() rand()
  13. -#define l_srand(x) srand(x)
  14. +#define l_srand(x) srand_deterministic(x)
  15. #define L_RANDMAX RAND_MAX
  16. #endif
  17. #endif /* } */