Skip to content

Commit b83c531

Browse files
vstinnerkulikjak
andcommitted
gh-63760: Don't declare gethostname() on Solaris
Since at least 2013, Oracle Solaris defines gethostname(). socketmodule.c no longer has to define gethostname() for Solaris. Oracle Solaris and OpenSolaris have patches to remove the gethostname() definition in Python: * https://github.com/oracle/solaris-userland/blob/master/components/python/python37/patches/15-gethostname.patch * https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/python/python37/patches/15-gethostname.patch * https://github.com/omniosorg/omnios-build/blob/master/build/python27/patches/24-gethostname.patch Co-Authored-by: Jakub Kulík <[email protected]>
1 parent e7de0c5 commit b83c531

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fix Solaris build: no longer redefine the ``gethostname()`` function. Oracle
2+
Solaris defines the function since at least 2013. Patch by Victor Stinner,
3+
original patch by Jakub Kulík.

Modules/socketmodule.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,6 @@ Local naming conventions:
111111
#include "pycore_fileutils.h" // _Py_set_inheritable()
112112
#include "pycore_moduleobject.h" // _PyModule_GetState
113113

114-
// gethostname() prototype missing from Solaris standard header files
115-
#ifdef __sun
116-
extern int gethostname(char *, int);
117-
#endif
118-
119114
#ifdef _Py_MEMORY_SANITIZER
120115
# include <sanitizer/msan_interface.h>
121116
#endif

0 commit comments

Comments
 (0)