From 9cfbd8e527f4d2f67e978e1a739d002fb58c8c8c Mon Sep 17 00:00:00 2001 From: Arnon Gilboa Date: Thu, 12 May 2011 12:12:09 +0300 Subject: [PATCH] common: fix ssl_verify windows build errors --- ssl_verify.c | 5 +++-- ssl_verify.h | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ssl_verify.c b/ssl_verify.c index 5e3722e..603d0f3 100644 --- a/ssl_verify.c +++ b/ssl_verify.c @@ -31,7 +31,7 @@ #include #ifndef SPICE_DEBUG -# define SPICE_DEBUG(format, args...) +# define SPICE_DEBUG(format, ...) #endif #ifdef WIN32 @@ -165,6 +165,7 @@ static int verify_hostname(X509* cert, const char *hostname) struct in_addr addr; int addr_len = 0; int cn_match = 0; + X509_NAME* subject; if (!cert) { SPICE_DEBUG("warning: no cert!"); @@ -227,7 +228,7 @@ static int verify_hostname(X509* cert, const char *hostname) } /* extracting commonNames */ - X509_NAME* subject = X509_get_subject_name(cert); + subject = X509_get_subject_name(cert); if (subject) { int pos = -1; X509_NAME_ENTRY* cn_entry; diff --git a/ssl_verify.h b/ssl_verify.h index f0b97d8..8235c13 100644 --- a/ssl_verify.h +++ b/ssl_verify.h @@ -19,6 +19,11 @@ #ifndef SSL_VERIFY_H #define SSL_VERIFY_H +#ifdef WIN32 +#include +#include +#endif + #include #include #include