From: Jehan Date: Mon, 24 Jan 2022 14:11:34 +0000 (+0100) Subject: tools: use rand() as fallback of random(). X-Git-Tag: archive/raspbian/1%0.1.106-3+rpi1^2~15^2~4^2~33 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1f1ce31cfe8650c497d11d8b17614ae9da01b637;p=babl.git 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. --- 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)