diff options
author | Jehan <jehan@girinstud.io> | 2022-01-24 15:11:34 +0100 |
---|---|---|
committer | Jehan <jehan@girinstud.io> | 2022-01-24 15:21:05 +0100 |
commit | 1f1ce31cfe8650c497d11d8b17614ae9da01b637 (patch) | |
tree | a0ddbeda15f202eefab3a794751568280762b192 /tools | |
parent | 22bd31c3666bfc9a07033a62ff7e94fae9b7af6d (diff) |
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.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/babl-lut-verify.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) |