diff --git a/src/des/new_rnd_key.c b/src/des/new_rnd_key.c index ca152b7ef9..c22b296ae7 100644 --- a/src/des/new_rnd_key.c +++ b/src/des/new_rnd_key.c @@ -50,7 +50,11 @@ static int is_inited = 0; */ #include -pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; +pthread_mutex_t des_init_mutex +#ifdef PTHREAD_MUTEX_INITIALIZER += PTHREAD_MUTEX_INITIALIZER +#endif +; #define LOCK_INIT assert(pthread_mutex_lock(&des_init_mutex)==0) #define UNLOCK_INIT assert(pthread_mutex_unlock(&des_init_mutex)==0) #else @@ -189,7 +193,11 @@ static unsigned char sequence_number[8]; */ #include -pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; +pthread_mutex_t des_random_mutex +#ifdef PTHREAD_MUTEX_INITIALIZER += PTHREAD_MUTEX_INITIALIZER +#endif +; #define LOCK_RANDOM assert(pthread_mutex_lock(&des_random_mutex)==0) #define UNLOCK_RANDOM assert(pthread_mutex_unlock(&des_random_mutex)==0) #else diff --git a/src/rxkad/rxkad_server.c b/src/rxkad/rxkad_server.c index 91e384caa4..7638482daf 100644 --- a/src/rxkad/rxkad_server.c +++ b/src/rxkad/rxkad_server.c @@ -78,7 +78,11 @@ static fc_KeySchedule random_int32_schedule; */ #include -pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; +pthread_mutex_t rxkad_random_mutex +#ifdef PTHREAD_MUTEX_INITIALIZER += PTHREAD_MUTEX_INITIALIZER +#endif +; #define LOCK_RM assert(pthread_mutex_lock(&rxkad_random_mutex)==0) #define UNLOCK_RM assert(pthread_mutex_unlock(&rxkad_random_mutex)==0) #else