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.
pull/30491/head
Hennadii Stepanov 8 months ago
parent ed739d14b5
commit 7703884ab1
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

@ -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 {

Loading…
Cancel
Save