Skip to content

Commit 7269916

Browse files
vstinnerkulikjak
andauthored
[3.12] gh-63760: Don't declare gethostname() on Solaris (#108817) (#108824)
gh-63760: Don't declare gethostname() on Solaris (#108817) Since 2005, 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]> (cherry picked from commit 0e6d582)
1 parent c5ce34f commit 7269916

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Include/pyport.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -429,11 +429,6 @@ Please be conservative with adding new ones, document them and enclose them
429429
in platform-specific #ifdefs.
430430
**************************************************************************/
431431

432-
#ifdef SOLARIS
433-
/* Unchecked */
434-
extern int gethostname(char *, int);
435-
#endif
436-
437432
#ifdef HAVE__GETPTY
438433
#include <sys/types.h> /* we need to import mode_t */
439434
extern char * _getpty(int *, int, mode_t, int);
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. Solaris
2+
defines the function since 2005. Patch by Victor Stinner, original patch by
3+
Jakub Kulík.

0 commit comments

Comments
 (0)