Issue #18259: Declare sethostname in socketmodule.c for AIX

This commit is contained in:
Christian Heimes 2013-06-19 02:07:20 +02:00
commit 71515510d8
2 changed files with 7 additions and 0 deletions

View file

@ -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",