From fb1c9185e36cf9c616ac15f54e54a01f052672bd Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Tue, 1 Oct 2013 13:26:13 +0200 Subject: tools/perf: Turn strlcpy() into a __weak function The strlcpy() feature check slows every build unnecessarily - so make it a __weak function so it does not have to be auto-detected. If the libc (or any other library) has an strlcpy() implementation it will be used - otherwise our fallback is active. Cc: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Namhyung Kim Cc: David Ahern Cc: Jiri Olsa Link: http://lkml.kernel.org/n/tip-zjbrcupapu08ePsyYhhhxiwk@git.kernel.org Signed-off-by: Ingo Molnar --- tools/perf/util/include/linux/compiler.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/perf/util/include/linux/compiler.h') diff --git a/tools/perf/util/include/linux/compiler.h b/tools/perf/util/include/linux/compiler.h index bef4d3ddc49..b003ad7200b 100644 --- a/tools/perf/util/include/linux/compiler.h +++ b/tools/perf/util/include/linux/compiler.h @@ -23,4 +23,8 @@ # define __force #endif +#ifndef __weak +# define __weak __attribute__((weak)) +#endif + #endif -- cgit v1.2.3-70-g09d2