Fix an error of "initializer element is not constant"

Patch from Andreas Falkenhahn

Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/380
This commit is contained in:
Akira TAGOH 2023-09-11 17:34:23 +09:00
parent e0eb855462
commit 70e2a9a189
1 changed files with 2 additions and 1 deletions

View File

@ -228,8 +228,9 @@ FcRandom(void)
#elif HAVE_LRAND48
result = lrand48 ();
#elif HAVE_RAND_R
static unsigned int seed = time (NULL);
static unsigned int seed;
seed = time (NULL);
result = rand_r (&seed);
#elif HAVE_RAND
static FcBool initialized = FcFalse;