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.
@@ -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
