提交 60ff92f5 编写于 作者: I Irina Tirdea 提交者: 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: NIrina 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: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 be4a2ded
......@@ -117,8 +117,8 @@ int perf_target__strerror(struct perf_target *target, int errnum,
if (err != buf) {
size_t len = strlen(err);
char *c = mempcpy(buf, err, min(buflen - 1, len));
*c = '\0';
memcpy(buf, err, min(buflen - 1, len));
*(buf + min(buflen - 1, len)) = '\0';
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册