[Python-checkins] cpython (3.3): Issue #18259: Declare sethostname in socketmodule.c for AIX

christian.heimes python-checkins at python.org
Wed Jun 19 02:09:11 CEST 2013


http://hg.python.org/cpython/rev/9f8efcd78d0d
changeset:   84209:9f8efcd78d0d
branch:      3.3
parent:      84202:7b6ae19dd116
user:        Christian Heimes <christian at cheimes.de>
date:        Wed Jun 19 02:06:29 2013 +0200
summary:
  Issue #18259: Declare sethostname in socketmodule.c for AIX

files:
  Misc/NEWS              |  2 ++
  Modules/socketmodule.c |  5 +++++
  2 files changed, 7 insertions(+), 0 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -32,6 +32,8 @@
 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.
 
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -4132,6 +4132,11 @@
     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",

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list