Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7151551

Browse files
committed
Issue #18259: Declare sethostname in socketmodule.c for AIX
2 parents 360b89c + d2774c7 commit 7151551

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ Core and Builtins
123123
Library
124124
-------
125125

126+
- Issue #18259: Declare sethostname in socketmodule.c for AIX
127+
126128
- Issue #18147: Add diagnostic functions to ssl.SSLContext(). get_ca_list()
127129
lists all loaded CA certificates and cert_store_stats() returns amount of
128130
loaded X.509 certs, X.509 CA certs and CRLs.

Modules/socketmodule.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4066,6 +4066,11 @@ socket_sethostname(PyObject *self, PyObject *args)
40664066
Py_buffer buf;
40674067
int res, flag = 0;
40684068

4069+
#ifdef _AIX
4070+
/* issue #18259, not declared in any useful header file */
4071+
extern int sethostname(const char *, size_t);
4072+
#endif
4073+
40694074
if (!PyArg_ParseTuple(args, "S:sethostname", &hnobj)) {
40704075
PyErr_Clear();
40714076
if (!PyArg_ParseTuple(args, "O&:sethostname",

0 commit comments

Comments
 (0)