patch-lib_roken_rand_c 491 B

1234567891011121314151617
  1. $OpenBSD: patch-lib_roken_rand_c,v 1.2 2016/12/17 14:58:31 ajacoutot Exp $
  2. Use HAVE_ARC4RANDOM and choose to call arc4random() instead of srand()
  3. and rand() and friends.
  4. --- lib/roken/rand.c.orig Tue Nov 29 02:35:27 2016
  5. +++ lib/roken/rand.c Thu Dec 15 11:32:07 2016
  6. @@ -42,7 +42,7 @@ void ROKEN_LIB_FUNCTION
  7. rk_random_init(void)
  8. {
  9. #if defined(HAVE_ARC4RANDOM)
  10. - arc4random_stir();
  11. + /* do nothing */
  12. #elif defined(HAVE_SRANDOMDEV)
  13. srandomdev();
  14. #elif defined(HAVE_RANDOM)