diff options
author | Kirill A. Shutemov <kirill@shutemov.name> | 2010-08-21 04:38:20 +0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-08-21 18:22:47 +0400 |
commit | f4e7ac0a233a4dc9b51345546ab69c64bb43e2c1 (patch) | |
tree | 26de697385ad30163970160e4c0c8ed9a4dd491b /tools/perf/util/path.c | |
parent | 8b9e74eb8af808807192d16b76565c27154ae7ed (diff) | |
download | linux-f4e7ac0a233a4dc9b51345546ab69c64bb43e2c1.tar.xz |
perf tools: add test for strlcpy()
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().
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <1282351101-8879-1-git-send-email-kirill@shutemov.name>
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/path.c')
-rw-r--r-- | tools/perf/util/path.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/path.c b/tools/perf/util/path.c index 58a470d036dd..bd7497711424 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 NO_STRLCPY 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; } - +#endif static char *get_pathname(void) { |