gh-78469: Declare missing sethostname for Solaris 10 (#109447)

Add OS version specific macro for Solaris: Py_SUNOS_VERSION.
This commit is contained in:
Jakub Kulík 2023-10-09 23:18:05 +02:00 committed by GitHub
parent 0050670d76
commit 3b1580af07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 2 deletions

View file

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