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

Skip to content

Commit d2774c7

Browse files
committed
Issue #18259: Declare sethostname in socketmodule.c for AIX
1 parent f0400ba commit d2774c7

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
@@ -32,6 +32,8 @@ Core and Builtins
3232
Library
3333
-------
3434

35+
- Issue #18259: Declare sethostname in socketmodule.c for AIX
36+
3537
- Issue #18167: cgi.FieldStorage no more fails to handle multipart/form-data
3638
when \r\n appears at end of 65535 bytes without other newlines.
3739

Modules/socketmodule.c

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

4135+
#ifdef _AIX
4136+
/* issue #18259, not declared in any useful header file */
4137+
extern int sethostname(const char *, size_t);
4138+
#endif
4139+
41354140
if (!PyArg_ParseTuple(args, "S:sethostname", &hnobj)) {
41364141
PyErr_Clear();
41374142
if (!PyArg_ParseTuple(args, "O&:sethostname",

0 commit comments

Comments
 (0)