From: Irina Tirdea Date: Sat, 8 Sep 2012 00:43:22 +0000 (+0300) Subject: tools lib traceevent: replace mempcpy with memcpy X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9612ef6716efc20fac0f57d59452cda4e6846bda;p=linux-beck.git tools lib traceevent: replace mempcpy with memcpy The mempcpy function 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: David Ahern Cc: Ingo Molnar Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/1347065004-15306-11-git-send-email-irina.tirdea@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index 4595aeb3c432..f4190b5764de 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c @@ -4833,8 +4833,8 @@ int pevent_strerror(struct pevent *pevent, enum pevent_errno errnum, msg = strerror_r(errnum, buf, buflen); if (msg != buf) { size_t len = strlen(msg); - char *c = mempcpy(buf, msg, min(buflen-1, len)); - *c = '\0'; + memcpy(buf, msg, min(buflen - 1, len)); + *(buf + min(buflen - 1, len)) = '\0'; } return 0; }