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

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


http://hg.python.org/cpython/rev/14748397fc57
changeset:   84210:14748397fc57
parent:      84203:390e7fe9a1d3
parent:      84209:9f8efcd78d0d
user:        Christian Heimes <christian at cheimes.de>
date:        Wed Jun 19 02:07:20 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
@@ -123,6 +123,8 @@
 Library
 -------
 
+- Issue #18259: Declare sethostname in socketmodule.c for AIX
+
 - Issue #18147: Add diagnostic functions to ssl.SSLContext(). get_ca_list()
   lists all loaded CA certificates and cert_store_stats() returns amount of
   loaded X.509 certs, X.509 CA certs and CRLs.
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -4066,6 +4066,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