Commit 60ff92f5 authored by Irina Tirdea's avatar Irina Tirdea Committed by Arnaldo Carvalho de Melo

perf tools: Replace mempcpy with memcpy

mempcpy is not supported by bionic in Android and will lead to
compilation errors.

Replacing mempcpy with memcpy so it will work in Android.
Signed-off-by: default avatarIrina Tirdea <irina.tirdea@intel.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/CANg8OW+Y3ZMG-GdhYu2_yKOYH_XEMgw73PdCX_23UTnfYhmttA@mail.gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent be4a2ded
...@@ -117,8 +117,8 @@ int perf_target__strerror(struct perf_target *target, int errnum, ...@@ -117,8 +117,8 @@ int perf_target__strerror(struct perf_target *target, int errnum,
if (err != buf) { if (err != buf) {
size_t len = strlen(err); size_t len = strlen(err);
char *c = mempcpy(buf, err, min(buflen - 1, len)); memcpy(buf, err, min(buflen - 1, len));
*c = '\0'; *(buf + min(buflen - 1, len)) = '\0';
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment