diff -upr core.orig/adb/adb_utils.cpp core/adb/adb_utils.cpp --- a/core.orig/adb/adb_utils.cpp 2016-07-10 15:17:54.889682995 +0200 +++ b/core/adb/adb_utils.cpp 2016-07-10 15:18:04.338747965 +0200 @@ -30,7 +30,7 @@ #include "adb_trace.h" #include "sysdeps.h" -bool getcwd(std::string* s) { +bool agetcwd(std::string* s) { char* cwd = getcwd(nullptr, 0); if (cwd != nullptr) *s = cwd; free(cwd); diff -upr core.orig/adb/commandline.cpp core/adb/commandline.cpp --- a/core.orig/adb/commandline.cpp 2016-07-10 15:17:54.889682995 +0200 +++ b/core/adb/commandline.cpp 2016-07-10 15:18:11.671355701 +0200 @@ -863,7 +863,7 @@ static std::string find_product_out_path // make it absolute. if (adb_dirstart(hint) != nullptr) { std::string cwd; - if (!getcwd(&cwd)) { + if (!agetcwd(&cwd)) { fprintf(stderr, "adb: getcwd failed: %s\n", strerror(errno)); return ""; } diff -upr core.orig/adb/adb_utils.h core/adb/adb_utils.h --- a/core.orig/adb/adb_utils.h 2016-07-10 15:21:09.327109127 +0200 +++ b/core/adb/adb_utils.h 2016-07-10 15:21:18.272890564 +0200 @@ -19,7 +19,7 @@ #include -bool getcwd(std::string* cwd); +bool agetcwd(std::string* cwd); bool directory_exists(const std::string& path); std::string escape_arg(const std::string& s);