summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS2
-rw-r--r--Modules/socketmodule.c5
2 files changed, 7 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index aa76923..734daf1 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -123,6 +123,8 @@ Core and Builtins
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
index 46265ad..8bd098f 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -4066,6 +4066,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",