blob: f1f3d4ee288be0c1fab87a1ab1dd48a32f52a425 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
$NetBSD: patch-ac,v 1.10 2005/11/19 18:41:16 joerg Exp $
--- libraries/libldap_r/thr_posix.c.orig 2005-09-28 00:30:29.000000000 +0000
+++ libraries/libldap_r/thr_posix.c
@@ -19,6 +19,7 @@
#if defined( HAVE_PTHREADS )
#include <ac/errno.h>
+#include <ac/unistd.h>
#include "ldap_pvt_thread.h" /* Get the thread interface */
#define LDAP_THREAD_IMPLEMENTATION
@@ -132,9 +133,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;
|