summaryrefslogtreecommitdiff
path: root/app/ico/ico.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/ico/ico.c')
-rw-r--r--app/ico/ico.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/ico/ico.c b/app/ico/ico.c
index 059ee0ef1..5eb26c91c 100644
--- a/app/ico/ico.c
+++ b/app/ico/ico.c
@@ -1008,11 +1008,14 @@ do_ico_window(void *ptr)
/* Get the initial position, size, and speed of the bounding-box */
+#ifndef HAVE_ARC4RANDOM_UNIFORM
srand((int) time((time_t *)0) % 231);
icoX = ((closure->winW - icoW) * (rand() & 0xFF)) >> 8;
icoY = ((closure->winH - icoH) * (rand() & 0xFF)) >> 8;
-
-
+#else
+ icoX = ((closure->winW - icoW) * arc4random_uniform(0xFF)) >> 8;
+ icoY = ((closure->winH - icoH) * arc4random_uniform(0xFF)) >> 8;
+#endif
/* Bounce the box in the window */
icodeltax2 = icoDeltaX * 2;