Mesa (main): util: Define WIN32_LEAN_AND_MEAN before include of `windows.h` in u_thread.h
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 15 18:05:01 UTC 2022
Module: Mesa
Branch: main
Commit: b7773fd105af14d3c8b561df922adc2eda599d10
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b7773fd105af14d3c8b561df922adc2eda599d10
Author: Yonggang Luo <luoyonggang at gmail.com>
Date: Sat Apr 9 23:58:34 2022 +0800
util: Define WIN32_LEAN_AND_MEAN before include of `windows.h` in u_thread.h
This is a prepare for move the c11 threads implementation into c source code
Signed-off-by: Yonggang Luo <luoyonggang at gmail.com>
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15087>
---
src/util/u_thread.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/util/u_thread.h b/src/util/u_thread.h
index d06ff6beddb..7d50e5ca87a 100644
--- a/src/util/u_thread.h
+++ b/src/util/u_thread.h
@@ -50,6 +50,9 @@
#if DETECT_OS_LINUX && !defined(ANDROID)
#include <sched.h>
#elif defined(_WIN32) && !defined(__CYGWIN__) && _WIN32_WINNT >= 0x0600
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1
+#endif
#include <windows.h>
#endif
More information about the mesa-commit
mailing list