[issue34288] Declare sethostname in socketmodule.c for SOLARIS

John Harrison report at bugs.python.org
Wed May 15 11:53:46 EDT 2019


John Harrison <john.harrison.web at gmail.com> 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/socketmodule.c
--- ../socketmodule.c   Wed May 15 16:36:32 2019
+++ Modules/socketmodule.c      Wed May 15 15:34:50 2019
@@ -5212,6 +5212,10 @@
 extern int sethostname(const char *, size_t);
 #endif

+#if (defined(__sun) && defined(__SVR4))
+extern int sethostname(const char *, size_t);
+#endif
+
     if (!PyArg_ParseTuple(args, "S:sethostname", &hnobj)) {
         PyErr_Clear();
         if (!PyArg_ParseTuple(args, "O&:sethostname",

----------
nosy: +John Harrison

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34288>
_______________________________________


More information about the Python-bugs-list mailing list