FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.12] gh-78469: Declare missing sethostname for Solaris 10 (GH-109447) by miss-islington · Pull Request #110580 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .ac  (1) .c  (1) .in  (1) No extension  (1) All 4 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
5 changes: 3 additions & 2 deletions Modules/socketmodule.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5655,8 +5655,9 @@ socket_sethostname(PyObject *self, PyObject *args)
Py_buffer buf;
int res, flag = 0;

#ifdef _AIX
/* issue #18259, not declared in any useful header file */
#if defined(_AIX) || (defined(__sun) && defined(__SVR4) && Py_SUNOS_VERSION <= 510)
/* issue #18259, sethostname is not declared in any useful header file on AIX
* the same is true for Solaris 10 */
extern int sethostname(const char *, size_t);
#endif

Expand Down
9 changes: 9 additions & 0 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions configure.ac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,14 @@ then
darwin*) MACHDEP="darwin";;
'') MACHDEP="unknown";;
esac

if test "$ac_sys_system" = "SunOS"; then
# For Solaris, there isn't an OS version specific macro defined
# in most compilers, so we define one here.
SUNOS_VERSION=`echo $ac_sys_release | sed -e 's!\.\([0-9]\)$!.0\1!g' | tr -d '.'`
AC_DEFINE_UNQUOTED([Py_SUNOS_VERSION], [$SUNOS_VERSION],
[The version of SunOS/Solaris as reported by `uname -r' without the dot.])
fi
fi
AC_MSG_RESULT(["$MACHDEP"])

Expand Down
3 changes: 3 additions & 0 deletions pyconfig.h.in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1621,6 +1621,9 @@
/* Define if you want to enable internal statistics gathering. */
#undef Py_STATS

/* The version of SunOS/Solaris as reported by `uname -r' without the dot. */
#undef Py_SUNOS_VERSION

/* Define if you want to enable tracing references for debugging purpose */
#undef Py_TRACE_REFS

Expand Down

Back | FazBrowse Home | New Git URL