From: Lev Stipakov Date: Mon, 7 Jun 2021 18:48:20 +0000 (+0300) Subject: options.c: fix msvc build error X-Git-Tag: v2.6_beta1~487 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88395a8307964ad48c3841c0b2fb60dce826ebf1;p=thirdparty%2Fopenvpn.git options.c: fix msvc build error Commit b7fe49c ("Do not require CA when peer-fingerprint is used") broke msvc build by adding #ifdef within msg() macro call. options.c(2074,1): error C2121: '#': invalid character: possibly the result of a macro expansion options.c(2074,1): error C2146: syntax error: missing ')' before identifier 'ifndef' options.c(2074,1): error C2059: syntax error: ')' Fix by moving #ifdef outside of msg(). Reported-by: Samuli Seppänen Signed-off-by: Lev Stipakov Acked-by: Gert Doering Acked-by: selva.nair@gmail.com Message-Id: <20210607184820.343-1-lstipakov@gmail.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22506.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/options.c b/src/openvpn/options.c index a54bc562f..819979b15 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -2069,11 +2069,12 @@ check_ca_required(const struct options *options) return; } - msg(M_USAGE, "You must define CA file (--ca)" + const char* str = "You must define CA file (--ca)" #ifndef ENABLE_CRYPTO_MBEDTLS " or CA path (--capath)" #endif - " and/or peer fingeprint verification " "(--peer-fingerprint)"); + " and/or peer fingerprint verification (--peer-fingerprint)"; + msg(M_USAGE, str); } static void