Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/base/include/android-base/utf8.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions src/sysdeps_win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<SetThreadDescription>(
auto set_thread_description_func = reinterpret_cast<SetThreadDescriptionAdb>(
::GetProcAddress(::GetModuleHandleW(L"Kernel32.dll"), "SetThreadDescription"));
if (set_thread_description_func) {
std::wstring name_wide;
Expand Down