diff options
author | Irina Tirdea <irina.tirdea@gmail.com> | 2012-08-29 02:22:16 +0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-09-06 02:35:21 +0400 |
commit | 60ff92f515a4efb36931f1b5b042332016e0f123 (patch) | |
tree | 6d369ba5c048e803a53b36963f8e36cd9a3f17a3 | |
parent | be4a2dedf6816871349fbddd018f266e93e3c22d (diff) | |
download | linux-60ff92f515a4efb36931f1b5b042332016e0f123.tar.xz |
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: 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>
-rw-r--r-- | tools/perf/util/target.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/target.c b/tools/perf/util/target.c index 051eaa68095e..065528b7563e 100644 --- a/tools/perf/util/target.c +++ b/tools/perf/util/target.c @@ -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; |