fix macro WIN32_LEAN_AND_MEAN redefined

json-c as add_subdirectory and project cmakelists.txt has add_definitions(-DWIN32_LEAN_AND_MEAN)
This commit is contained in:
Careles
2025-01-06 10:56:53 +08:00
parent a304464807
commit 51bcdd0000
2 changed files with 4 additions and 0 deletions

View File

@@ -38,7 +38,9 @@
#endif /* HAVE_UNISTD_H */
#ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <io.h>
#include <windows.h>
#endif /* defined(_WIN32) */

View File

@@ -25,7 +25,9 @@
#endif
#if defined(_MSC_VER) || defined(__MINGW32__)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h> /* Get InterlockedCompareExchange */
#endif