This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author David.Edelsohn
Recipients David.Edelsohn, vstinner
Date 2013-06-18.22:25:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1371594352.51.0.0927804743578.issue18259@psf.upfronthosting.co.za>
In-reply-to
Content
AIX provides sethostname() but it is not declared in any useful header. Fixed as follows:

diff -r 626a8e49f2a9 Modules/socketmodule.c
--- a/Modules/socketmodule.c    Tue Jun 18 23:28:18 2013 +0200
+++ b/Modules/socketmodule.c    Tue Jun 18 20:17:37 2013 -0700
@@ -4066,6 +4066,10 @@
     Py_buffer buf;
     int res, flag = 0;
 
+#ifdef _AIX
+extern int sethostname(const char *, size_t);
+#endif
+
     if (!PyArg_ParseTuple(args, "S:sethostname", &hnobj)) {
         PyErr_Clear();
         if (!PyArg_ParseTuple(args, "O&:sethostname",

It seemed best to declare it inside the function. I placed it below the other declarations, not immediately before the function use.
History
Date User Action Args
2013-06-18 22:25:52David.Edelsohnsetrecipients: + David.Edelsohn, vstinner
2013-06-18 22:25:52David.Edelsohnsetmessageid: <1371594352.51.0.0927804743578.issue18259@psf.upfronthosting.co.za>
2013-06-18 22:25:52David.Edelsohnlinkissue18259 messages
2013-06-18 22:25:52David.Edelsohncreate