https://bugs.freedesktop.org/show_bug.cgi?id=74603
static struct random_data fcrandbuf;
static char statebuf[256];
static FcBool initialized = FcFalse;
static struct random_data fcrandbuf;
static char statebuf[256];
static FcBool initialized = FcFalse;
+#ifdef _AIX
+ static char *retval;
+ long res;
+#endif
if (initialized != FcTrue)
{
if (initialized != FcTrue)
{
- initstate_r(time(NULL), statebuf, 256, &fcrandbuf);
+#ifdef _AIX
+ initstate_r (time (NULL), statebuf, 256, &retval, &fcrandbuf);
+#else
+ initstate_r (time (NULL), statebuf, 256, &fcrandbuf);
+#endif
- random_r(&fcrandbuf, &result);
+#ifdef _AIX
+ random_r (&res, &fcrandbuf);
+ result = (int32_t)res;
+#else
+ random_r (&fcrandbuf, &result);
+#endif
#elif HAVE_RANDOM
static char statebuf[256];
char *state;
#elif HAVE_RANDOM
static char statebuf[256];
char *state;
if (initialized != FcTrue)
{
if (initialized != FcTrue)
{
- state = initstate(time(NULL), statebuf, 256);
+ state = initstate (time (NULL), statebuf, 256);
initialized = FcTrue;
}
else
initialized = FcTrue;
}
else
- state = setstate(statebuf);
+ state = setstate (statebuf);
- static unsigned int seed = time(NULL);
+ static unsigned int seed = time (NULL);
- result = rand_r(&seed);
+ result = rand_r (&seed);
#elif HAVE_RAND
static FcBool initialized = FcFalse;
if (initialized != FcTrue)
{
#elif HAVE_RAND
static FcBool initialized = FcFalse;
if (initialized != FcTrue)
{
#else
# error no random number generator function available.
#endif
#else
# error no random number generator function available.
#endif