commit | d956dd78d0fa1a357abee1365c0f05933683dd08 | [log] [tgz] |
---|---|---|
author | Josh Gao <jmgao@google.com> | Fri Apr 03 19:11:48 2020 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Fri Apr 03 19:11:48 2020 +0000 |
tree | c4d09638be5c18fb477e0dbf4acac169d27040e2 | |
parent | 79f3d26b25e731890266f0223fe3453a315a5acb [diff] | |
parent | 0aafa0f714ffb2afe43712abb1098cc4318ed02d [diff] |
Merge "adb: add implementation of mempcpy for deficient platforms."
diff --git a/adb/sysdeps.h b/adb/sysdeps.h index 9a879b5..7ea30d1 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