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 <samuli@openvpn.net>
Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
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 <gert@greenie.muc.de>
... | ... |
@@ -2069,11 +2069,12 @@ check_ca_required(const struct options *options) |
2069 | 2069 |
return; |
2070 | 2070 |
} |
2071 | 2071 |
|
2072 |
- msg(M_USAGE, "You must define CA file (--ca)" |
|
2072 |
+ const char* str = "You must define CA file (--ca)" |
|
2073 | 2073 |
#ifndef ENABLE_CRYPTO_MBEDTLS |
2074 | 2074 |
" or CA path (--capath)" |
2075 | 2075 |
#endif |
2076 |
- " and/or peer fingeprint verification " "(--peer-fingerprint)"); |
|
2076 |
+ " and/or peer fingerprint verification (--peer-fingerprint)"; |
|
2077 |
+ msg(M_USAGE, str); |
|
2077 | 2078 |
} |
2078 | 2079 |
|
2079 | 2080 |
static void |