--- krb5-1.4.3/src/aclocal.m4 2006-01-19 18:56:17.000000000 -0500 +++ krb5-1.4.3/src/aclocal.m4 2006-01-19 18:56:11.000000000 -0500 @@ -171,7 +171,14 @@ dnl reference support we can figure out whether or not the pthread library dnl has been linked in. dnl If we don't add any libraries for thread support, don't bother. -AC_CHECK_FUNCS(pthread_once pthread_mutexattr_setrobust_np pthread_rwlock_init) +for fn in pthread_once pthread_mutexattr_setrobust_np pthread_rwlock_init ; do + AC_CHECK_DECLS($fn,,,[ + #ifdef HAVE_PTHREAD + #include + #endif + ]) + AC_CHECK_FUNCS($fn) +done old_CC="$CC" test "$PTHREAD_CC" != "" && test "$ac_cv_c_compiler_gnu" = no && CC=$PTHREAD_CC old_CFLAGS="$CFLAGS" --- krb5-1.4.3/src/util/support/threads.c 2005-08-12 16:57:07.000000000 -0400 +++ krb5-1.4.3/src/util/support/threads.c 2006-01-19 19:00:59.000000000 -0500 @@ -141,7 +141,7 @@ || &pthread_equal == 0 /* This catches Solaris 9. May be redundant with the above tests now. */ -# ifdef HAVE_PTHREAD_MUTEXATTR_SETROBUST_NP_IN_THREAD_LIB +# if defined(HAVE_PTHREAD_MUTEXATTR_SETROBUST_NP_IN_THREAD_LIB) && HAVE_DECL_PTHREAD_MUTEXATTR_SETROBUST_NP || &pthread_mutexattr_setrobust_np == 0 # endif /* Any program that's really multithreaded will have to be