Permalink
Browse files

Fix compile failure on Solaris with Sun Studio

Change-Id: I37b677671565f83e2b67367a5080c9691831f845
Reviewed-on: http://review.couchbase.org/25226
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
  • Loading branch information...
trondn authored and avsej committed Mar 19, 2013
1 parent 0e22162 commit 429e5e5e5d2bbffd742d55c6cca5dab709afb3d5
Showing with 7 additions and 3 deletions.
  1. +7 −3 example/pillowfight/pillowfight.cc
@@ -604,13 +604,16 @@ static void handle_options(int argc, char **argv)
std::list<ThreadContext *> contexts;
InstancePool *pool = NULL;
-static void setup_sigint_handler(void (handler)(int));
-
extern "C" {
+ typedef void (*handler_t)(int);
+
static void cruel_handler(int);
static void gentle_handler(int);
}
+static void setup_sigint_handler(handler_t handler);
+
+
static void cruel_handler(int)
{
std::list<ThreadContext *>::iterator it;
@@ -629,7 +632,7 @@ static void gentle_handler(int)
setup_sigint_handler(cruel_handler);
}
-static void setup_sigint_handler(void (handler)(int))
+static void setup_sigint_handler(handler_t handler)
{
struct sigaction action;
@@ -649,6 +652,7 @@ static void *thread_worker(void *arg)
ctx->populate(0, config.maxKey);
ctx->run();
pthread_exit(NULL);
+ return NULL;
}
/**

0 comments on commit 429e5e5

Please sign in to comment.