gh-78469: Declare missing sethostname for Solaris 10 (#109447)

Add OS version specific macro for Solaris: Py_SUNOS_VERSION.
This commit is contained in:
Jakub Kulík 2023-10-09 23:18:05 +02:00 committed by GitHub
parent 0050670d76
commit 3b1580af07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 2 deletions

View file

@ -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"])