$NetBSD: patch-aa,v 1.1.1.1 2004/01/26 11:46:28 jmmv Exp $

--- libs/ext/cothreads/tests/cothreads.c.orig	2002-08-14 07:53:24.000000000 +1000
+++ libs/ext/cothreads/tests/cothreads.c
@@ -94,12 +94,14 @@ int main (int argc, char *argv[])
 #ifdef HAVE_PTHREAD_ATTR_SETSTACK
     if (!pthread_attr_setstack (&attr[i], stack, MAIN_STACK_SIZE))
       perror ("setting stack size and address");
-#else
+#elif defined(HAVE_PTHREAD_ATTR_SETSTACKADDR)
     if (!pthread_attr_setstackaddr (&attr[i], stack))
       perror ("setting stack address");
+#ifdef HAVE_PTHREAD_ATTR_SETSTACKSIZE
     if (!pthread_attr_setstacksize (&attr[i], MAIN_STACK_SIZE))
       perror ("setting stack size");
 #endif
+#endif
     
     pthread_create (&thread[i], &attr[i], pthread, &pthreadnum[i]);
   }
