summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/lib/libpthread
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2014-11-16 05:09:23 +0000
committerngie <ngie@FreeBSD.org>2014-11-16 05:09:23 +0000
commitf840de8bc3bef985ee900051958116d980d52e1a (patch)
treed720e2ce5e1cf469855cfc0fb20b806998106b85 /contrib/netbsd-tests/lib/libpthread
parentc480c4f5e2a1af01829d75d7349316fc2b26b08c (diff)
downloadFreeBSD-src-f840de8bc3bef985ee900051958116d980d52e1a.zip
FreeBSD-src-f840de8bc3bef985ee900051958116d980d52e1a.tar.gz
Add pthread_np.h #include and initialize the pthread attribute on FreeBSD
Submitted by: pho
Diffstat (limited to 'contrib/netbsd-tests/lib/libpthread')
-rw-r--r--contrib/netbsd-tests/lib/libpthread/t_join.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/lib/libpthread/t_join.c b/contrib/netbsd-tests/lib/libpthread/t_join.c
index 7f6f834..71b6775 100644
--- a/contrib/netbsd-tests/lib/libpthread/t_join.c
+++ b/contrib/netbsd-tests/lib/libpthread/t_join.c
@@ -37,6 +37,10 @@ __RCSID("$NetBSD: t_join.c,v 1.8 2012/03/12 20:17:16 joerg Exp $");
#include <atf-c.h>
+#ifdef __FreeBSD__
+#include <pthread_np.h>
+#endif
+
#include "h_common.h"
#ifdef CHECK_STACK_ALIGNMENT
@@ -152,6 +156,9 @@ threadfunc2(void *arg)
j = (uintptr_t)arg;
+#ifdef __FreeBSD__
+ pthread_attr_init(&attr);
+#endif
ATF_REQUIRE(pthread_attr_get_np(pthread_self(), &attr) == 0);
ATF_REQUIRE(pthread_attr_getstacksize(&attr, &stacksize) == 0);
ATF_REQUIRE(stacksize == STACKSIZE * (j + 1));
OpenPOWER on IntegriCloud