From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 28 Sep 2019 02:20:31 +0000 (-0700) Subject: bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446) (... X-Git-Tag: v3.8.0rc1~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8750bce9884335d43ac06989f64473ed877c5b63;p=thirdparty%2FPython%2Fcpython.git bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446) (#16449) (cherry picked from commit 52d1b86bde2b772a76919c76991c326384954bf1) Co-authored-by: Jesús Cea --- diff --git a/Misc/NEWS.d/next/Build/2019-09-28-02-37-11.bpo-38301.123456.rst b/Misc/NEWS.d/next/Build/2019-09-28-02-37-11.bpo-38301.123456.rst new file mode 100644 index 000000000000..59c9a76385e2 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2019-09-28-02-37-11.bpo-38301.123456.rst @@ -0,0 +1,2 @@ +In Solaris family, we must be sure to use ``-D_REENTRANT``. +Patch by Jesús Cea Avión. diff --git a/configure b/configure index 379ac6408eab..2a933cdbeb61 100755 --- a/configure +++ b/configure @@ -10500,6 +10500,9 @@ then $as_echo "#define _REENTRANT 1" >>confdefs.h posix_threads=yes + if test "$ac_sys_system" = "SunOS"; then + CFLAGS="$CFLAGS -D_REENTRANT" + fi elif test "$ac_cv_kpthread" = "yes" then CC="$CC -Kpthread" diff --git a/configure.ac b/configure.ac index 7b3b0b8be48b..a189d42c2c36 100644 --- a/configure.ac +++ b/configure.ac @@ -3063,6 +3063,9 @@ then # Defining _REENTRANT on system with POSIX threads should not hurt. AC_DEFINE(_REENTRANT) posix_threads=yes + if test "$ac_sys_system" = "SunOS"; then + CFLAGS="$CFLAGS -D_REENTRANT" + fi elif test "$ac_cv_kpthread" = "yes" then CC="$CC -Kpthread"