From a05e4b8854673d719819f30ab882b15ae0debd1e Mon Sep 17 00:00:00 2001 From: Keyue Hu Date: Sun, 29 Mar 2026 10:29:17 +0800 Subject: [PATCH] msvc: fix broken build against sdk7.1a In SDKs older than 10.0 such as 7.1a, there is no header file named synchapi.h. windows.h should be fine. ``` In file included from D:\a\yass\yass\third_party\asio\include\asio/detail/mutex.hpp:23: D:\a\yass\yass\third_party\asio\include\asio/detail/win_mutex.hpp(25,10): fatal error: 'synchapi.h' file not found 25 | #include | ^~~~~~~~~~~~ Note: including file: D:\a\yass\yass\third_party\asio\include\asio/detail/push_options.hpp ``` --- include/asio/detail/win_mutex.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/asio/detail/win_mutex.hpp b/include/asio/detail/win_mutex.hpp index 015d1dbfbe..a11eb045ad 100644 --- a/include/asio/detail/win_mutex.hpp +++ b/include/asio/detail/win_mutex.hpp @@ -22,7 +22,9 @@ #include "asio/detail/noncopyable.hpp" #include "asio/detail/scoped_lock.hpp" #include "asio/detail/socket_types.hpp" +#ifndef _USING_V110_SDK71_ #include +#endif #include "asio/detail/push_options.hpp"