mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
gh-78469: Declare missing sethostname for Solaris 10 (#109447)
Add OS version specific macro for Solaris: Py_SUNOS_VERSION.
This commit is contained in:
parent
0050670d76
commit
3b1580af07
4 changed files with 23 additions and 2 deletions
|
@ -5652,8 +5652,9 @@ socket_sethostname(PyObject *self, PyObject *args)
|
|||
Py_buffer buf;
|
||||
int res, flag = 0;
|
||||
|
||||
#ifdef _AIX
|
||||
/* issue #18259, not declared in any useful header file */
|
||||
#if defined(_AIX) || (defined(__sun) && defined(__SVR4) && Py_SUNOS_VERSION <= 510)
|
||||
/* issue #18259, sethostname is not declared in any useful header file on AIX
|
||||
* the same is true for Solaris 10 */
|
||||
extern int sethostname(const char *, size_t);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue