This patch was adapted from a 2.6 patch which came from upstream:
--- Python-2.7.9/Include/pyport.h.orig 2014-12-10 07:59:32.000000000 -0800
+++ Python-2.7.9/Include/pyport.h 2015-04-08 18:38:02.450233799 -0700
@@ -640,11 +640,6 @@
in platform-specific #ifdefs.
**************************************************************************/
-#ifdef SOLARIS
-/* Unchecked */
-extern int gethostname(char *, int);
-#endif
-
#ifdef __BEOS__
/* Unchecked */
/* It's in the libs, but not the headers... - [cjh] */