Skip to content

Commit

Permalink
perf tools: Replace mempcpy with memcpy
Browse files Browse the repository at this point in the history
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: Irina 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.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Irina Tirdea authored and Arnaldo Carvalho de Melo committed Sep 5, 2012
1 parent be4a2de commit 60ff92f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/perf/util/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 60ff92f

Please sign in to comment.