blob: 74ddc6d534050344f70e1c64817fd6effa72a7e0 (
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.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 <ac/errno.h>
+#include <ac/unistd.h>
#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;
|