*** ./src/fccache.c.ORIG Wed Aug 29 14:22:55 2012 --- ./src/fccache.c Wed Aug 29 14:53:12 2012 *************** *** 246,268 **** static int fcCacheMaxLevel; static int32_t FcRandom(void) { int32_t result; #if HAVE_RANDOM_R static struct random_data fcrandbuf; static char statebuf[256]; static FcBool initialized = FcFalse; if (initialized != FcTrue) { ! initstate_r(time(NULL), statebuf, 256, &fcrandbuf); initialized = FcTrue; } ! random_r(&fcrandbuf, &result); #elif HAVE_RANDOM static char statebuf[256]; char *state; --- 246,279 ---- static int fcCacheMaxLevel; + /* + * random_r() is implemented differently on AIX than on Linux: + * Please check out this posting for details: + * http://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00215.html + */ + static int32_t FcRandom(void) { + #ifdef _AIX + long result; + #else int32_t result; + #endif #if HAVE_RANDOM_R static struct random_data fcrandbuf; static char statebuf[256]; + static char *randP; static FcBool initialized = FcFalse; if (initialized != FcTrue) { ! initstate_r(time(NULL), statebuf, 256, &randP, &fcrandbuf); initialized = FcTrue; } ! random_r(&result, &fcrandbuf); #elif HAVE_RANDOM static char statebuf[256]; char *state; *** ./src/fcstat.c.ORIG Wed Aug 29 14:42:20 2012 --- ./src/fcstat.c Wed Aug 29 14:40:21 2012 *************** *** 36,41 **** --- 36,44 ---- #ifdef HAVE_SYS_STATFS_H #include #endif + #ifdef _AIX + #include + #endif #ifdef HAVE_SYS_PARAM_H #include #endif *** ./src/fcarch.c.ORIG Wed Aug 29 15:09:04 2012 --- ./src/fcarch.c Wed Aug 29 21:30:13 2012 *************** *** 56,62 **** FC_ASSERT_STATIC (SIZEOF_VOID_P == sizeof (FcCharLeaf **)); FC_ASSERT_STATIC (SIZEOF_VOID_P == sizeof (FcChar16 *)); ! FC_ASSERT_STATIC (0x08 + 1*FC_MAX(4,ALIGNOF_DOUBLE) == sizeof (FcValue)); FC_ASSERT_STATIC (0x00 + 2*SIZEOF_VOID_P == sizeof (FcPatternElt)); FC_ASSERT_STATIC (0x08 + 2*SIZEOF_VOID_P == sizeof (FcPattern)); FC_ASSERT_STATIC (0x08 + 2*SIZEOF_VOID_P == sizeof (FcCharSet)); --- 56,64 ---- FC_ASSERT_STATIC (SIZEOF_VOID_P == sizeof (FcCharLeaf **)); FC_ASSERT_STATIC (SIZEOF_VOID_P == sizeof (FcChar16 *)); ! #if !defined(__64BIT__) ! FC_ASSERT_STATIC (0x08 + 1*ALIGNOF_DOUBLE == sizeof (FcValue)); ! #endif FC_ASSERT_STATIC (0x00 + 2*SIZEOF_VOID_P == sizeof (FcPatternElt)); FC_ASSERT_STATIC (0x08 + 2*SIZEOF_VOID_P == sizeof (FcPattern)); FC_ASSERT_STATIC (0x08 + 2*SIZEOF_VOID_P == sizeof (FcCharSet));