$NetBSD: patch-ac,v 1.12 2012/03/13 19:57:11 adam Exp $ --- libraries/libldap_r/thr_posix.c.orig 2006-05-13 11:47:50.000000000 +0200 +++ libraries/libldap_r/thr_posix.c @@ -19,6 +19,7 @@ #if defined( HAVE_PTHREADS ) #include +#include #ifdef REPLACE_BROKEN_YIELD #ifndef HAVE_NANOSLEEP @@ -146,9 +147,11 @@ ldap_pvt_thread_create( ldap_pvt_thread_ #endif #ifdef LDAP_PVT_THREAD_SET_STACK_SIZE +#if defined(_POSIX_THREAD_ATTR_STACKSIZE) /* this should be tunable */ pthread_attr_setstacksize( &attr, LDAP_PVT_THREAD_STACK_SIZE ); #endif +#endif #if HAVE_PTHREADS > 5 detach = detach ? PTHREAD_CREATE_DETACHED : PTHREAD_CREATE_JOINABLE;