From 86af9b5ee1b03fdf5d201577ee9eb1ec06140c34 Mon Sep 17 00:00:00 2001 From: ncnnnnn <67086033+ncnnnnn@users.noreply.github.com> Date: Thu, 29 Aug 2024 09:13:13 +0800 Subject: [PATCH 1/3] =?UTF-8?q?win32=20mkdir=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/base/include/android-base/utf8.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/base/include/android-base/utf8.h b/lib/base/include/android-base/utf8.h index c9cc1ab..f233211 100755 --- a/lib/base/include/android-base/utf8.h +++ b/lib/base/include/android-base/utf8.h @@ -89,7 +89,7 @@ namespace utf8 { #ifdef _WIN32 FILE* fopen(const char* name, const char* mode); -int mkdir(const char* name, mode_t mode); +int mkdir(const char* name); int open(const char* name, int flags, ...); int unlink(const char* name); #else From b577968038bdec87c08bfd2eeb119f8eda39bb52 Mon Sep 17 00:00:00 2001 From: ncnnnnn <67086033+ncnnnnn@users.noreply.github.com> Date: Thu, 29 Aug 2024 09:15:16 +0800 Subject: [PATCH 2/3] =?UTF-8?q?c++=E7=89=88=E6=9C=AC=E6=94=B9=E4=B8=BA14?= =?UTF-8?q?=E9=81=BF=E5=85=8Dbyte=E5=AE=9A=E4=B9=89=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a774b7e..feb6dc0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -11,7 +11,7 @@ ADD_CUSTOM_COMMAND( ${CMAKE_CURRENT_SOURCE_DIR}/version.cmake) set(version_src ${CMAKE_CURRENT_BINARY_DIR}/version.cpp) -set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD 14) set(libadb_srcs ${version_src} From 3de43c1776d1641f10c6e6ebb8bb5048417e3f58 Mon Sep 17 00:00:00 2001 From: ncnnnnn <67086033+ncnnnnn@users.noreply.github.com> Date: Thu, 29 Aug 2024 09:19:42 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8DSetThreadDescrip?= =?UTF-8?q?tion=E9=81=BF=E5=85=8D=E5=AE=9A=E4=B9=89=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sysdeps_win32.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sysdeps_win32.cpp b/src/sysdeps_win32.cpp index bce13f5..828a086 100644 --- a/src/sysdeps_win32.cpp +++ b/src/sysdeps_win32.cpp @@ -2746,13 +2746,13 @@ char* adb_getcwd(char* buf, int size) { } // The SetThreadDescription API was brought in version 1607 of Windows 10. -typedef HRESULT(WINAPI* SetThreadDescription)(HANDLE hThread, PCWSTR lpThreadDescription); +typedef HRESULT(WINAPI* SetThreadDescriptionAdb)(HANDLE hThread, PCWSTR lpThreadDescription); // Based on PlatformThread::SetName() from // https://cs.chromium.org/chromium/src/base/threading/platform_thread_win.cc int adb_thread_setname(const std::string& name) { // The SetThreadDescription API works even if no debugger is attached. - auto set_thread_description_func = reinterpret_cast( + auto set_thread_description_func = reinterpret_cast( ::GetProcAddress(::GetModuleHandleW(L"Kernel32.dll"), "SetThreadDescription")); if (set_thread_description_func) { std::wstring name_wide;