diff --git a/Misc/NEWS.d/next/Build/2023-09-02-18-04-15.gh-issue-63760.r8hJ6q.rst b/Misc/NEWS.d/next/Build/2023-09-02-18-04-15.gh-issue-63760.r8hJ6q.rst new file mode 100644 index 00000000000000..9a7249e923e0c7 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2023-09-02-18-04-15.gh-issue-63760.r8hJ6q.rst @@ -0,0 +1,3 @@ +Fix Solaris build: no longer redefine the ``gethostname()`` function. Solaris +defines the function since 2005. Patch by Victor Stinner, original patch by +Jakub KulĂ­k. diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 74b1c1c661604f..90592ffc152fc1 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -111,11 +111,6 @@ Local naming conventions: #include "pycore_fileutils.h" // _Py_set_inheritable() #include "pycore_moduleobject.h" // _PyModule_GetState -// gethostname() prototype missing from Solaris standard header files -#ifdef __sun -extern int gethostname(char *, int); -#endif - #ifdef _Py_MEMORY_SANITIZER # include #endif