]> granicus.if.org Git - python/commitdiff
Issue #18259: Declare sethostname in socketmodule.c for AIX
authorChristian Heimes <christian@cheimes.de>
Wed, 19 Jun 2013 00:06:29 +0000 (02:06 +0200)
committerChristian Heimes <christian@cheimes.de>
Wed, 19 Jun 2013 00:06:29 +0000 (02:06 +0200)
Misc/NEWS
Modules/socketmodule.c

index a9eeeffd373df1a8093f5d545706b797183ea91e..fa89eb3593ad93807e2f5fad78c2990693a4a783 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -32,6 +32,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #18259: Declare sethostname in socketmodule.c for AIX
+
 - Issue #18167: cgi.FieldStorage no more fails to handle multipart/form-data
   when \r\n appears at end of 65535 bytes without other newlines.
 
index 9b58a11bd5499c17a7a69b15166f7357df3dcaa3..2c8a29cc929610614a050010c5fec84c4eba5e42 100644 (file)
@@ -4132,6 +4132,11 @@ socket_sethostname(PyObject *self, PyObject *args)
     Py_buffer buf;
     int res, flag = 0;
 
+#ifdef _AIX
+/* issue #18259, not declared in any useful header file */
+extern int sethostname(const char *, size_t);
+#endif
+
     if (!PyArg_ParseTuple(args, "S:sethostname", &hnobj)) {
         PyErr_Clear();
         if (!PyArg_ParseTuple(args, "O&:sethostname",