From f4e7ac0a233a4dc9b51345546ab69c64bb43e2c1 Mon Sep 17 00:00:00 2001 From: "Kirill A. Shutemov" Date: Sat, 21 Aug 2010 03:38:20 +0300 Subject: 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 Cc: Paul Mackerras Cc: Ingo Molnar LKML-Reference: <1282351101-8879-1-git-send-email-kirill@shutemov.name> Signed-off-by: Kirill A. Shutemov Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tools/perf/Makefile') diff --git a/tools/perf/Makefile b/tools/perf/Makefile index dcb9700b88d2..7473de00682b 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -647,6 +647,15 @@ else endif endif + +ifdef NO_STRLCPY + BASIC_CFLAGS += -DNO_STRLCPY +else + ifneq ($(call try-cc,$(SOURCE_STRLCPY),),y) + BASIC_CFLAGS += -DNO_STRLCPY + endif +endif + ifndef CC_LD_DYNPATH ifdef NO_R_TO_GCC_LINKER # Some gcc does not accept and pass -R to the linker to specify -- cgit v1.2.3-59-g8ed1b