From: Irina Tirdea Date: Tue, 28 Aug 2012 22:22:16 +0000 (+0300) Subject: perf tools: Replace mempcpy with memcpy X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=60ff92f515a4efb36931f1b5b042332016e0f123;p=openwrt%2Fstaging%2Fblogic.git 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 Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/CANg8OW+Y3ZMG-GdhYu2_yKOYH_XEMgw73PdCX_23UTnfYhmttA@mail.gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- 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;