summaryrefslogtreecommitdiffstats
path: root/contrib/awk
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/awk')
-rw-r--r--contrib/awk/builtin.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/awk/builtin.c b/contrib/awk/builtin.c
index e620985..dc2c1d3 100644
--- a/contrib/awk/builtin.c
+++ b/contrib/awk/builtin.c
@@ -1263,7 +1263,11 @@ NODE *tree;
(void) setstate(state);
if (tree == NULL)
+#ifdef __FreeBSD__
+ srandom((unsigned int) (save_seed = (long) time((time_t *) 0) ^ getpid()));
+#else
srandom((unsigned int) (save_seed = (long) time((time_t *) 0)));
+#endif
else {
tmp = tree_eval(tree->lnode);
srandom((unsigned int) (save_seed = (long) force_number(tmp)));
OpenPOWER on IntegriCloud