From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] perf: add test for strlcpy()
Date: Sat, 21 Aug 2010 14:15:37 -0300 [thread overview]
Message-ID: <20100821171537.GE2973@ghostprotocols.net> (raw)
In-Reply-To: <1282351101-8879-1-git-send-email-kirill@shutemov.name>
Em Sat, Aug 21, 2010 at 03:38:20AM +0300, Kirill A. Shutemov escreveu:
> Some Linux distributions like ALT Linux provides patched glibc with
> contains strlcpy(). It's confilcts with strlcpy() from perf.
>
> Let's add check for strlcpy().
It doesn't work on !ALT Linux ;-\
LINK /home/acme/git/build/perf//perf
/home/acme/git/build/perf//libperf.a(path.o): In function `perf_vsnpath':
/home/acme/git/linux/tools/perf/util/path.c:74: undefined reference to `strlcpy'
/home/acme/git/build/perf//libperf.a(abspath.o): In function `get_pwd_cwd':
/home/acme/git/linux/tools/perf/util/abspath.c:16: undefined reference to `strlcpy'
/home/acme/git/build/perf//libperf.a(abspath.o): In function `make_nonrelative_path':
/home/acme/git/linux/tools/perf/util/abspath.c:27: undefined reference to `strlcpy'
collect2: ld returned 1 exit status
make: *** [/home/acme/git/build/perf//perf] Error 1
make: Leaving directory `/home/acme/git/linux/tools/perf'
[acme@emilia linux]$
See below why:
> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> ---
> tools/perf/Makefile | 8 ++++++++
> tools/perf/feature-tests.mak | 11 +++++++++++
> tools/perf/util/cache.h | 2 ++
> tools/perf/util/path.c | 3 ++-
> 4 files changed, 23 insertions(+), 1 deletions(-)
>
> diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> index 4f1fa77..496a0d6 100644
> --- a/tools/perf/Makefile
> +++ b/tools/perf/Makefile
> @@ -653,6 +653,14 @@ else
> diff --git a/tools/perf/util/path.c b/tools/perf/util/path.c
> index 58a470d..029661c 100644
> --- a/tools/perf/util/path.c
> +++ b/tools/perf/util/path.c
> @@ -22,6 +22,7 @@ static const char *get_perf_dir(void)
> return ".";
> }
>
> +#ifdef STRLCPY
Should be:
+#ifdef NO_STRLCPY
I'm fixing it up.
> size_t strlcpy(char *dest, const char *src, size_t size)
> {
> size_t ret = strlen(src);
> @@ -33,7 +34,7 @@ size_t strlcpy(char *dest, const char *src, size_t size)
> }
> return ret;
> }
next prev parent reply other threads:[~2010-08-21 17:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-21 0:38 [PATCH 1/2] perf: add test for strlcpy() Kirill A. Shutemov
2010-08-21 0:38 ` [PATCH 2/2] perf: fix build with -Wl,--as-needed Kirill A. Shutemov
2010-08-21 17:25 ` Arnaldo Carvalho de Melo
2010-08-21 17:15 ` Arnaldo Carvalho de Melo [this message]
2010-08-21 17:24 ` [PATCH 1/2] perf: add test for strlcpy() Kirill A. Shutemov
2010-08-21 20:19 ` [tip:perf/core] perf tools: " tip-bot for Kirill A. Shutemov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100821171537.GE2973@ghostprotocols.net \
--to=acme@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.