$NetBSD: patch-ac,v 1.3 2003/01/19 09:26:33 skrll Exp $

--- libraries/libldap_r/thr_posix.c.orig	Fri Jan  4 20:38:23 2002
+++ libraries/libldap_r/thr_posix.c
@@ -103,7 +103,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
 
 	rtn = pthread_create( thread, &attr, start_routine, arg );
