summaryrefslogtreecommitdiff
path: root/databases/openldap/patches/patch-ac
blob: c23aa4d9cc491aa7fd719defef35bc36c30639c2 (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
25
$NetBSD: patch-ac,v 1.6 2004/12/14 09:08:37 adam Exp $

--- libraries/libldap_r/thr_posix.c.orig	2004-01-01 18:16:30.000000000 +0000
+++ libraries/libldap_r/thr_posix.c
@@ -112,8 +112,10 @@ 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
 	detach = detach ? PTHREAD_CREATE_DETACHED : PTHREAD_CREATE_JOINABLE;
@@ -190,7 +192,8 @@ ldap_pvt_thread_yield( void )
 	return thr_yield();
 
 #elif HAVE_PTHREADS == 10
-	return sched_yield();
+	sched_yield();
+	return 0;
 
 #elif defined(_POSIX_THREAD_IS_GNU_PTH)
 	sched_yield();