Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.12] gh-63760: Don't declare gethostname() on Solaris (#108817) #108824

Merged
merged 1 commit into from
Sep 2, 2023

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Sep 2, 2023

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 <Kulikjak@gmail.com>
(cherry picked from commit 0e6d582)
@vstinner
Copy link
Member Author

vstinner commented Sep 2, 2023

Python has this issue since 2005: this backport can wait for Python 3.12.1, there is no rush :-)

@Yhg1s Yhg1s merged commit 7269916 into python:3.12 Sep 2, 2023
@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR, and @Yhg1s for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-108832 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Sep 2, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 2, 2023
…GH-108817) (pythonGH-108824)

pythongh-63760: Don't declare gethostname() on Solaris (pythonGH-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)
vstinner added a commit that referenced this pull request Sep 3, 2023
…8817) (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>
@vstinner vstinner deleted the socket_solaris_gethostname branch September 13, 2023 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants