From 42eecd5048b86a456604a3716f36c7921ab91c5d Mon Sep 17 00:00:00 2001
From: Peter Pentchev <roam@ringlet.net>
Date: Fri, 11 Mar 2011 12:15:15 +0200
Subject: [PATCH 1/2] Initialize a pthread attribute before using it.

---
 src/sthreads.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/sthreads.c b/src/sthreads.c
index b36cccf..613991f 100644
--- a/src/sthreads.c
+++ b/src/sthreads.c
@@ -293,6 +293,7 @@ int create_client(int ls, int s, CLI *arg, void *(*cli)(void *)) {
     pthread_t thread;
 #ifdef HAVE_PTHREAD_SIGMASK
     sigset_t newmask, oldmask;
+#endif
 
     (void)ls; /* this parameter is only used with USE_FORK */
     /* initialize attributes for creating new threads */
@@ -300,6 +301,7 @@ int create_client(int ls, int s, CLI *arg, void *(*cli)(void *)) {
     pthread_attr_setdetachstate(&pth_attr, PTHREAD_CREATE_DETACHED);
     pthread_attr_setstacksize(&pth_attr, arg->opt->stack_size);
 
+#ifdef HAVE_PTHREAD_SIGMASK
     /* the idea is that only the main thread handles all the signals with
      * posix threads;  signals are blocked for any other thread */
     sigemptyset(&newmask);
-- 
1.7.2.3

