$NetBSD: patch-ac,v 1.4 2003/09/18 05:37:18 markd Exp $

--- libraries/libldap_r/thr_posix.c.orig	2003-05-25 22:34:36.000000000 +0200
+++ libraries/libldap_r/thr_posix.c	2003-05-25 22:36:17.000000000 +0200
@@ -110,8 +110,10 @@
 
 #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
 	detach = detach ? PTHREAD_CREATE_DETACHED : PTHREAD_CREATE_JOINABLE;
