8000 [3.11] [3.12] gh-63760: Don't declare gethostname() on Solaris (GH-10… · python/cpython@b30c83e · GitHub
[go: up one dir, main page]

Skip to content

Commit b30c83e

Browse files
[3.11] [3.12] gh-63760: Don't declare gethostname() on Solaris (GH-108817) (GH-108824) (#108832)
[3.12] gh-63760: Don't declare gethostname() on Solaris (GH-108817) (GH-108824) gh-63760: Don't declare gethostname() on Solaris (GH-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 (cherry picked from commit 7269916) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Jakub Kulík <Kulikjak@gmail.com> (cherry picked from commit 0e6d582) Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent 76f5219 commit b30c83e

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
@@ -439,11 +439,6 @@ Please be conservative with adding new ones, document them and enclose them
439439
in platform-specific #ifdefs.
440440
**************************************************************************/
441441

442-
#ifdef SOLARIS
443-
/* Unchecked */
444-
extern int gethostname(char *, int);
445-
#endif
446-
447442
#ifdef HAVE__GETPTY
448443
#include <sys/types.h> /* we need to import mode_t */
449444
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)
0