summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Grunt <pgrunt@redhat.com>2016-10-14 13:45:43 +0200
committerFrediano Ziglio <fziglio@redhat.com>2016-10-14 13:01:42 +0100
commit4dd9e8a93c3e5000b99a74b8cb57cfb64be27c72 (patch)
tree7c2dc0c20360a52bb0c5890a87996aa68595a38a
parent2ebd69c4c548b9479d6a18ed72750449455d0d01 (diff)
reds: Define openssl lock only if needed
Silence a warning: reds.c:150:25: warning: 'lock_cs' defined but not used [-Wunused-variable] static pthread_mutex_t *lock_cs; Acked-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r--server/reds.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/reds.c b/server/reds.c
index 8dff12db..79f9c9e8 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -147,8 +147,6 @@ static SpiceCoreInterfaceInternal core_interface_adapter = {
#define REDS_TOKENS_TO_SEND 5
#define REDS_VDI_PORT_NUM_RECEIVE_BUFFS 5
-static pthread_mutex_t *lock_cs;
-
/* TODO while we can technically create more than one server in a process,
* the intended use is to support a single server per process */
static GList *servers = NULL;
@@ -2759,6 +2757,8 @@ static int ssl_password_cb(char *buf, int size, int flags, void *userdata)
}
#if OPENSSL_VERSION_NUMBER < 0x1010000FL
+static pthread_mutex_t *lock_cs;
+
static unsigned long pthreads_thread_id(void)
{
unsigned long ret;