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 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} 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;