diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/zsh_system.h | 4 | ||||
-rw-r--r-- | configure.ac | 3 |
3 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 8af09a396..7290210b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-08-10 Mikael Magnusson <mikachu@gmail.com> + + * 39014: Src/zsh_system.h, configure.ac: Use special OpenBSD + interface to get correct rand() behavior + 2016-08-06 Barton E. Schaefer <schaefer@zsh.org> * unposted: Src/Zle/zle_thingy.c: fix typo in comment diff --git a/Src/zsh_system.h b/Src/zsh_system.h index 17c4c645e..a9cbf02d0 100644 --- a/Src/zsh_system.h +++ b/Src/zsh_system.h @@ -882,6 +882,10 @@ extern short ospeed; # endif #endif +#ifdef HAVE_SRAND_DETERMINISTIC +# define srand srand_deterministic +#endif + #ifdef ZSH_VALGRIND # include "valgrind/valgrind.h" # include "valgrind/memcheck.h" diff --git a/configure.ac b/configure.ac index 9ce3a4589..bac62a638 100644 --- a/configure.ac +++ b/configure.ac @@ -1322,7 +1322,8 @@ AC_CHECK_FUNCS(strftime strptime mktime timelocal \ realpath canonicalize_file_name \ symlink getcwd \ cygwin_conv_path \ - nanosleep) + nanosleep \ + srand_deterministic) AC_FUNC_STRCOLL AH_TEMPLATE([REALPATH_ACCEPTS_NULL], |