Fix MSVC warning C4273 "inconsistent dll linkage"

When using CMake, the user can select the MSVC runtime library to be:
1) Statically-linked (with the corresponding `x64-windows-static` vcpkg
triplet) or
2) Dynamically-linked (with the corresponding `x64-windows` vcpkg
triplet)

In the latter case, the compiler emits the C4273 warning.

As the "Necessary on some platforms" comment does not apply to MSVC,
skip the declaration for MSVC.
This commit is contained in:
Hennadii Stepanov 2024-02-26 18:06:32 +00:00
parent ed739d14b5
commit 7703884ab1
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -58,7 +58,9 @@
#include <sys/auxv.h>
#endif
#ifndef _MSC_VER
extern char** environ; // NOLINT(readability-redundant-declaration): Necessary on some platforms
#endif
namespace {