fix redefinition of WIN32_LEAN_AND_MEAN
Change-Id: I11c31b8022e88c8bb36ea03275b9ac5fdfeaee08
diff --git a/aom_ports/arm_cpudetect.c b/aom_ports/arm_cpudetect.c
index c914d04..e1981c4 100644
--- a/aom_ports/arm_cpudetect.c
+++ b/aom_ports/arm_cpudetect.c
@@ -60,7 +60,9 @@
#if HAVE_NEON && \
!(defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC))
/*For GetExceptionCode() and EXCEPTION_ILLEGAL_INSTRUCTION.*/
+#undef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
+#undef WIN32_EXTRA_LEAN
#define WIN32_EXTRA_LEAN
#include <windows.h>
#endif // HAVE_NEON &&
diff --git a/aom_util/aom_thread.h b/aom_util/aom_thread.h
index 89f793d..2df190f 100644
--- a/aom_util/aom_thread.h
+++ b/aom_util/aom_thread.h
@@ -31,6 +31,7 @@
// Prevent leaking max/min macros.
#undef NOMINMAX
#define NOMINMAX
+#undef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#include <errno.h> // NOLINT
#include <process.h> // NOLINT
diff --git a/test/register_state_check.h b/test/register_state_check.h
index 3c244c2..0a150c3 100644
--- a/test/register_state_check.h
+++ b/test/register_state_check.h
@@ -30,6 +30,7 @@
#undef NOMINMAX
#define NOMINMAX
+#undef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winnt.h>
diff --git a/test/video_source.h b/test/video_source.h
index 7d953f4..f7a8b98 100644
--- a/test/video_source.h
+++ b/test/video_source.h
@@ -14,6 +14,7 @@
#if defined(_WIN32)
#undef NOMINMAX
#define NOMINMAX
+#undef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif