$NetBSD: patch-ac,v 1.5 2004/07/24 03:32:24 jlam Exp $

--- libraries/libldap_r/thr_posix.c.orig	Thu Jan  1 13:16:30 2004
+++ libraries/libldap_r/thr_posix.c
@@ -112,7 +112,9 @@ ldap_pvt_thread_create( ldap_pvt_thread_
 
 #if defined(LDAP_PVT_THREAD_STACK_SIZE) && LDAP_PVT_THREAD_STACK_SIZE > 0
 	/* this should be tunable */
+#if defined(_POSIX_THREAD_ATTR_STACKSIZE)
 	pthread_attr_setstacksize( &attr, LDAP_PVT_THREAD_STACK_SIZE );
+#endif
 #endif
 
 #if HAVE_PTHREADS > 5
