lkml.org 
[lkml]   [2012]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 11/13] perf tools: replace mempcpy with memcpy
Em Wed, Aug 29, 2012 at 01:06:04AM +0300, Irina Tirdea escreveu:
> 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>
> ---
> tools/perf/util/target.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/target.c b/tools/perf/util/target.c
> index 051eaa6..065528b 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';
> }
>

Can you resubmit this in txt form? I applied some other patches from you
but you need to try to do it yourself, i.e. send just to you, then try
to save the patch and apply it...

- Arnaldo


\
 
 \ /
  Last update: 2012-09-06 01:01    [W:0.028 / U:25.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site