build: Fix C4005 "macro redefinition" MSVC warnings in examples

This commit is contained in:
Hennadii Stepanov
2023-04-13 12:23:30 +01:00
parent 3bab71cf05
commit dc0657c762
3 changed files with 6 additions and 4 deletions

View File

@@ -17,7 +17,13 @@
*/
#if defined(_WIN32)
/*
* The defined WIN32_NO_STATUS macro disables return code definitions in
* windows.h, which avoids "macro redefinition" MSVC warnings in ntstatus.h.
*/
#define WIN32_NO_STATUS
#include <windows.h>
#undef WIN32_NO_STATUS
#include <ntstatus.h>
#include <bcrypt.h>
#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)