diff options
author | Kirill A. Shutemov <kirill@shutemov.name> | 2010-08-21 02:38:20 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-08-21 16:22:47 +0200 |
commit | f4e7ac0a233a4dc9b51345546ab69c64bb43e2c1 (patch) | |
tree | 26de697385ad30163970160e4c0c8ed9a4dd491b /tools/perf/feature-tests.mak | |
parent | perf tools: Add --tui and --stdio to choose the UI (diff) | |
download | linux-f4e7ac0a233a4dc9b51345546ab69c64bb43e2c1.tar.xz linux-f4e7ac0a233a4dc9b51345546ab69c64bb43e2c1.zip |
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/feature-tests.mak')
-rw-r--r-- | tools/perf/feature-tests.mak | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/perf/feature-tests.mak b/tools/perf/feature-tests.mak index ddb68e601f0e..ef3d0d6a9e23 100644 --- a/tools/perf/feature-tests.mak +++ b/tools/perf/feature-tests.mak @@ -110,6 +110,17 @@ int main(void) } endef +define SOURCE_STRLCPY +#include <stdlib.h> +extern size_t strlcpy(char *dest, const char *src, size_t size); + +int main(void) +{ + strlcpy(NULL, NULL, 0); + return 0; +} +endef + # try-cc # Usage: option = $(call try-cc, source-to-build, cc-options) try-cc = $(shell sh -c \ |