From 325dd2f0914de502ae7687f94927fa98c20380c9 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sat, 27 Nov 2010 22:19:43 +0100 Subject: Functions passed to pthread_create are declared as extern "C" So far these were declared as C++ static functions which was incorrect and caused warnings with SunStudio. Signed-off-by: Martin Sustrik --- tests/test_shutdown_stress.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'tests/test_shutdown_stress.cpp') diff --git a/tests/test_shutdown_stress.cpp b/tests/test_shutdown_stress.cpp index a8079d4..fed67b7 100644 --- a/tests/test_shutdown_stress.cpp +++ b/tests/test_shutdown_stress.cpp @@ -24,18 +24,21 @@ #define THREAD_COUNT 100 -void *worker (void *s) +extern "C" { - int rc; + static void *worker (void *s) + { + int rc; - rc = zmq_connect (s, "tcp://127.0.0.1:5555"); - assert (rc == 0); + rc = zmq_connect (s, "tcp://127.0.0.1:5555"); + assert (rc == 0); - // Start closing the socket while the connecting process is underway. - rc = zmq_close (s); - assert (rc == 0); + // Start closing the socket while the connecting process is underway. + rc = zmq_close (s); + assert (rc == 0); - return NULL; + return NULL; + } } int main (int argc, char *argv []) -- cgit v1.2.3