diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-09-27 19:21:24 -0700 |
---|---|---|
committer | Jesús Cea <jcea@jcea.es> | 2019-09-28 04:21:24 +0200 |
commit | 6112b91bb827b07ab83e3e720aa055772a2c8b9d (patch) | |
tree | 2ae9d90b07c1c8c6ca0d0ea2d46befaaa4fef197 | |
parent | 39a0c7555530e31c6941a78da19b6a5b61170687 (diff) | |
download | cpython-git-6112b91bb827b07ab83e3e720aa055772a2c8b9d.tar.gz |
bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446) (#16450)
(cherry picked from commit 52d1b86bde2b772a76919c76991c326384954bf1)
Co-authored-by: Jesús Cea <jcea@jcea.es>
-rw-r--r-- | Misc/NEWS.d/next/Build/2019-09-28-02-37-11.bpo-38301.123456.rst | 2 | ||||
-rwxr-xr-x | configure | 3 | ||||
-rw-r--r-- | configure.ac | 3 |
3 files changed, 8 insertions, 0 deletions
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 0000000000..59c9a76385 --- /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. @@ -10489,6 +10489,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 93f3b0d5a6..1ef0df70e6 100644 --- a/configure.ac +++ b/configure.ac @@ -3079,6 +3079,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" |