summaryrefslogtreecommitdiff
path: root/src/c
diff options
context:
space:
mode:
authorGravatar Vladimir Shabanov <vshabanoff@gmail.com>2012-01-14 23:02:34 +0400
committerGravatar Vladimir Shabanov <vshabanoff@gmail.com>2012-01-14 23:02:34 +0400
commit8da996a251e58b03a50e99b987a00c816180b727 (patch)
tree792cbdcbf18844a362daefbb6363680b1d36a156 /src/c
parentf2b84bc39038d11eed7a82da0ddb875fa48839a4 (diff)
Fixed clients mutex initialization for compiling under OS X.
Diffstat (limited to 'src/c')
-rw-r--r--src/c/urweb.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index 915a8c76..738c765c 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -159,8 +159,13 @@ typedef struct client {
static client **clients, *clients_free, *clients_used;
static unsigned n_clients;
-static pthread_mutex_t clients_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
-
+static pthread_mutex_t clients_mutex =
+ #ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+ PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+ #else
+ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+ #endif
+ ;
size_t uw_messages_max = SIZE_MAX;
size_t uw_clients_max = SIZE_MAX;