summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesús Cea <jcea@jcea.es>2019-09-28 03:44:32 +0200
committerJesús Cea <jcea@jcea.es>2019-09-28 04:16:55 +0200
commitcbf04fd2a519ed0560d1b04cd24c43e9d8086c87 (patch)
tree7065eacec441629a64d30b2071628c269481f7fd
parentf0501630b0ba31448c230c756b1027647f4ef100 (diff)
downloadcpython-git-backport-52d1b86-3.6.tar.gz
[3.6] bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446).backport-52d1b86-3.6
(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.rst2
-rwxr-xr-xconfigure3
-rw-r--r--configure.ac3
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.
diff --git a/configure b/configure
index e39c16eee2..c34a13fb58 100755
--- a/configure
+++ b/configure
@@ -10406,6 +10406,9 @@ then
posix_threads=yes
THREADOBJ="Python/thread.o"
+ 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 cf280506bd..3741c06e08 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3056,6 +3056,9 @@ then
AC_DEFINE(_REENTRANT)
posix_threads=yes
THREADOBJ="Python/thread.o"
+ if test "$ac_sys_system" = "SunOS"; then
+ CFLAGS="$CFLAGS -D_REENTRANT"
+ fi
elif test "$ac_cv_kpthread" = "yes"
then
CC="$CC -Kpthread"