0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 12:12:15 +02:00

ip/ping6: Use _WIN32, not _MSC_VER (to fix MinGW).

When compiling openvpn3 with MinGW, the build fails as follows:

    openvpn3/openvpn/ip/ping6.hpp:46:20: error: no member named 's6_addr16' in 'in6_addr'
          return addr->s6_addr16;
                 ~~~~  ^

This is because the code checks for _MSC_VER instead of _WIN32.

Signed-off-by: Jay Freeman (saurik) <saurik@saurik.com>
GitHub-pull-req: #73
Approved-by: Lev Stipakov <lev@openvpn.net>
Approved-by: David Sommerseth <davids@openvpn.net>
This commit is contained in:
Jay Freeman (saurik) 2019-06-05 19:31:14 -07:00 committed by David Sommerseth
parent 03a906771e
commit fe7f984c5d
No known key found for this signature in database
GPG Key ID: 86CF944C9671FDF2

View File

@ -38,7 +38,7 @@ namespace openvpn {
inline static const std::uint16_t* get_addr16(const struct in6_addr *addr) inline static const std::uint16_t* get_addr16(const struct in6_addr *addr)
{ {
#if defined(_MSC_VER) #if defined(_WIN32)
return addr->u.Word; return addr->u.Word;
#elif defined(__APPLE__) #elif defined(__APPLE__)
return addr->__u6_addr.__u6_addr16; return addr->__u6_addr.__u6_addr16;