summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>2017-04-27 21:48:20 +0000
committerrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>2017-04-27 21:48:20 +0000
commitb216f91037a928eaa76516de60d4d776616feb82 (patch)
tree60a05c948a7549b461a87b6b8db331d087d72ab3
parent179bd9d2bffa8caa6e2c15b25b16128b2ead3a65 (diff)
downloadlibapr-b216f91037a928eaa76516de60d4d776616feb82.tar.gz
pthread_mutex_timedlock is broken on Solaris 10.
It can block without timeout in case of EDEADLK. On Solaris 8 it does not exist, on Solaris 11 it is fixed. For Solaris 10 no patch is available. Backport of r1792961 from trunk. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1792962 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--build/apr_hints.m46
1 files changed, 6 insertions, 0 deletions
diff --git a/build/apr_hints.m4 b/build/apr_hints.m4
index 549a2db22..c2e59e5f0 100644
--- a/build/apr_hints.m4
+++ b/build/apr_hints.m4
@@ -119,6 +119,7 @@ dnl # Not a problem in 10.20. Otherwise, who knows?
;;
*-linux*)
APR_ADDTO(CPPFLAGS, [-DLINUX -D_REENTRANT -D_GNU_SOURCE])
+ APR_SETIFNULL(ac_cv_func_pthread_mutex_timedlock, [no])
;;
*-lynx-lynxos)
APR_ADDTO(CPPFLAGS, [-D__NO_INCLUDE_WARN__ -DLYNXOS])
@@ -237,6 +238,11 @@ dnl # Not a problem in 10.20. Otherwise, who knows?
*-solaris2*)
PLATOSVERS=`echo $host | sed 's/^.*solaris2.//'`
APR_ADDTO(CPPFLAGS, [-DSOLARIS2=$PLATOSVERS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT])
+ if test $PLATOSVERS -eq 10; then
+ # pthread_mutex_timedlock is broken on Solaris 10.
+ # It can block without timeout in case of EDEADLK.
+ APR_SETIFNULL(ac_cv_func_pthread_mutex_timedlock, [no])
+ fi
if test $PLATOSVERS -ge 10; then
APR_SETIFNULL(apr_lock_method, [USE_PROC_PTHREAD_SERIALIZE])
else