From 1f1ce31cfe8650c497d11d8b17614ae9da01b637 Mon Sep 17 00:00:00 2001 From: Jehan Date: Mon, 24 Jan 2022 15:11:34 +0100 Subject: [PATCH] tools: use rand() as fallback of random(). This fixes building babl on Windows as the random() API is not available there (unlike rand()). Windows docs says it's not cryptographically secure but for this tool usage, it's probably enough and I see we use the same function replacement tricks on other tool sources. --- tools/babl-lut-verify.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/babl-lut-verify.c b/tools/babl-lut-verify.c index e23ed3d..5f79682 100644 --- a/tools/babl-lut-verify.c +++ b/tools/babl-lut-verify.c @@ -6,6 +6,9 @@ #define PIXELS 127*256 //less than threshold for generating +#ifndef HAVE_SRANDOM +#define random rand +#endif static double test_u8_premul (void) -- 2.30.2