Fix Windows builds (rand/random API)

This commit is contained in:
Robin Gareus 2021-08-14 01:07:13 +02:00
parent 79baf356b9
commit fc90c92a49
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
5 changed files with 19 additions and 1 deletions

View file

@ -23,6 +23,8 @@
#include <cfloat>
#include <cstdlib>
#include <glib.h>
#include "pbd/failed_constructor.h"
#include "pbd/string_convert.h"
@ -732,5 +734,5 @@ Gtkmm2ext::set_source_rgb_a (cairo_t *cr, Color color, float alpha)
Color
Gtkmm2ext::random_color ()
{
return ((random() % 16777215) << 8 | 0xff);
return ((g_random_int() % 16777215) << 8 | 0xff);
}