[babl] tests: Use rand when random is unavailable



commit c1f075f22c70de54c2b04ca5df008a5e406d3ca9
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Sat Feb 1 23:13:28 2014 -0800

    tests: Use rand when random is unavailable

 tests/babl_fish_path_fitness.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/tests/babl_fish_path_fitness.c b/tests/babl_fish_path_fitness.c
index 8480fc0..bab17d6 100644
--- a/tests/babl_fish_path_fitness.c
+++ b/tests/babl_fish_path_fitness.c
@@ -6,6 +6,11 @@
 #include <math.h>
 #include "babl-internal.h"
 
+#ifndef HAVE_SRANDOM
+#define srandom srand
+#define random  rand
+#endif
+
 #define pixels    1024
 int           total_length = 0;
 int           total_cost   = 0;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]