From 601d635c4bff99e5259ee934f24a6aeba3bb99d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B6r=C3=B6k=20Edvin?= Date: Fri, 15 Apr 2011 16:03:52 +0300 Subject: [PATCH] fix win32 build MSVC is stuck in '89, must declare all variables first. --- libclamav/others_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libclamav/others_common.c b/libclamav/others_common.c index e0c33d30e..53b710180 100644 --- a/libclamav/others_common.c +++ b/libclamav/others_common.c @@ -96,8 +96,9 @@ void cli_logg_unsetup(void) static inline void *cli_getctx(void) { + cli_ctx *ctx; pthread_once(&cli_ctx_tls_key_once, cli_ctx_tls_key_alloc); - cli_ctx *ctx = pthread_getspecific(cli_ctx_tls_key); + ctx = pthread_getspecific(cli_ctx_tls_key); return ctx ? ctx->cb_ctx : NULL; } #else