mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
[3.11] gh-78469: Declare missing sethostname for Solaris 10 (GH-109447) (#110581)
Add OS version specific macro for Solaris: Py_SUNOS_VERSION.
(cherry picked from commit 3b1580af07
)
Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
This commit is contained in:
parent
2b3a418279
commit
194272179d
4 changed files with 25 additions and 2 deletions
|
@ -5534,8 +5534,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