Issue 16263: sendmsg, recvmsg, recvmsg_into et al not being detected on Solaris (original) (raw)
After some investigation, I've established the following cause:
1. Our Solaris builds should add -D_XPG4_2 to CPPFLAGS. I've been
manually setting this on the Solaris build slaves. This define
ensures all the POSIX 95 things get picked up (like sendmsg etc).
2. Even when it is in CPPFLAGS, it doesn't get picked up when
building extension modules, such as socketmodule.c, because they
are built solely with CCSHARED.
The first issue can be fixed via configure.ac/Makefile.pre.in.
As for the second issue... it's somewhat odd that there's no documented way to ensure extra flags get passed $CC when building extensions. Then again, it's always been like this, and nobody has complained to date.
Thus, rather than introduce a public/documented way for extending flags passed to $CC when building extension modules, I think for now, altering configure.ac/Makefile.pre.in to also tweak CCSHARED when on Solaris as part of fixing the first part is sufficient.
Patch to follow.
Trent.
P.S.: when -D_XPG4_2 is added to CCSHARED, the socket sendmsg stuff gets built and... drum-roll fails some tests :-)