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
#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
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.