John Harrison added the comment:
On Solaris 10 i386 I successfully built _socket on 3.7.3 by patching *in* a
Solaris test (by cloning the test for the INET_ADDRSTRLEN definition currently
on line 268) rather than by patching away the _AIX ifdef
$ diff -u ../socketmodule.c Modules/socketmodul
New submission from Roy Belio :
Following issue 18259 which was solved by extern sethostname I managed to build
python 3.7 on solaris only after patching away the ifdef for _AIX.
We need to add SOLARIS flag and check for that also in the same line of
#ifdef _AIX.
This error only appears in 3.