AIX does define initstate_r(), which autoconf is correctly picking up. However the prototype of the IBM initstate_r() has five arguments, and does not match the linux prototype with four arguments. The random_r() prototype is also different to linux prototype. Patching ling 169 in fccompat.c from #ifdef HAVE_RANDOM_R to #if defined(HAVE_RANDOM_R) && !defined(_AIX) allows the compile to go through OK, and all looks to be well.
Using reentrant one would be safe and ideal solution IMHO. just disabling it for AIX looks wrong to me, particularly for where it is available. probably we should simply support that with ifdef'd.
Created attachment 93515 [details] AIX patch for random_r
I see that someone at http://www.oss4aix.org/download/patches/fontconfig-2.10.1-aix.patch has alraedy had a go at this, but it seems to me that this patch is specific to aix, and breaks a build on any other platform where the reentrant prototype exists. How about the attached?
Thanks. revised a bit and pushed into git.
Thanks!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.