commit | d527ae40dc6dc0b181fcb36e4553a4acd478f928 | [log] [tgz] |
---|---|---|
author | Josh Gao <jmgao@google.com> | Sat Apr 04 06:45:09 2020 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Sat Apr 04 06:45:09 2020 +0000 |
tree | e8d9d5d04ee1e1d340a6f42de0c89fe5d3379610 | |
parent | 59f0acc14669677619008de22910823c289a8c36 [diff] | |
parent | fbf30e4155344cbbc33138c0a14eb250314a25ea [diff] |
Merge "adb: add implementation of mempcpy for deficient platforms." into rvc-dev
diff --git a/adb/sysdeps.h b/adb/sysdeps.h index 3e781b8..6ce5098 100644 --- a/adb/sysdeps.h +++ b/adb/sysdeps.h
@@ -42,6 +42,12 @@ #include "sysdeps/network.h" #include "sysdeps/stat.h" +#if defined(__APPLE__) +static void* mempcpy(void* dst, const void* src, size_t n) { + return static_cast<char*>(memcpy(dst, src, n)) + n; +} +#endif + #ifdef _WIN32 // Clang-only nullability specifiers