The build of this module fails with this error: In file included from /usr/include/limits.h:12:0, from /usr/gcc/5/lib/gcc/sparcv9-sun-solaris2.11/5.4.0/include-fixed/limits.h:168, from /usr/gcc/5/lib/gcc/sparcv9-sun-solaris2.11/5.4.0/include-fixed/syslimits.h:7, from /usr/gcc/5/lib/gcc/sparcv9-sun-solaris2.11/5.4.0/include-fixed/limits.h:34, from Include/Python.h:19, from /opt/apps/salt-build/Python-2.7.15/Modules/_multiprocessing/multiprocessing.h:12, from /opt/apps/salt-build/Python-2.7.15/Modules/_multiprocessing/multiprocessing.c:9: /usr/gcc/5/lib/gcc/sparcv9-sun-solaris2.11/5.4.0/include-fixed/sys/feature_tests.h:363:2: error: #error "Compiler or options invalid for pre-UNIX 03 X/Open applications and pre-2001 POSIX applications" Changing the value of _XOPEN_SOURCE from 500 to 600 in Modules/_multiprocessing/multiprocessing.h fixes it.
I don't think you can blindly change that value of that definition. It will likely break the compilation of the module using Solaris Sun Studio while fixing compilation with gcc. The attached patch should do the correct thing in the presence of either toolchain.