- SilcMutex mutex = silc_calloc(1, sizeof(*mutex));
- pthread_mutex_init(&mutex->mutex, NULL);
+#ifdef SILC_THREADS
+ *mutex = silc_calloc(1, sizeof(**mutex));
+ if (*mutex == NULL)
+ return FALSE;
+ pthread_mutex_init(&(*mutex)->mutex, NULL);
+ return TRUE;
+#else
+ return FALSE;
+#endif /* SILC_THREADS */