Author: ngie
Date: Sun Nov 16 05:09:23 2014
New Revision: 274574
URL: https://svnweb.freebsd.org/changeset/base/274574

Log:
  Add pthread_np.h #include and initialize the pthread attribute on FreeBSD
  
  Submitted by: pho

Modified:
  head/contrib/netbsd-tests/lib/libpthread/t_join.c

Modified: head/contrib/netbsd-tests/lib/libpthread/t_join.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libpthread/t_join.c   Sun Nov 16 05:08:19 
2014        (r274573)
+++ head/contrib/netbsd-tests/lib/libpthread/t_join.c   Sun Nov 16 05:09:23 
2014        (r274574)
@@ -37,6 +37,10 @@ __RCSID("$NetBSD: t_join.c,v 1.8 2012/03
 
 #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));
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to