diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-10-01 07:26:13 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-10-09 02:48:49 -0400 |
commit | fb1c9185e36cf9c616ac15f54e54a01f052672bd (patch) | |
tree | ab6bcf354a39a2e662fd3492ca9f8b4384b3a7d9 /tools/perf/util/include/linux/compiler.h | |
parent | 7a10822a30060eceddda16c051086c00acb449c9 (diff) |
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 <acme@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/n/tip-zjbrcupapu08ePsyYhhhxiwk@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/include/linux/compiler.h')
-rw-r--r-- | tools/perf/util/include/linux/compiler.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/include/linux/compiler.h b/tools/perf/util/include/linux/compiler.h index bef4d3ddc493..b003ad7200b2 100644 --- a/tools/perf/util/include/linux/compiler.h +++ b/tools/perf/util/include/linux/compiler.h | |||
@@ -23,4 +23,8 @@ | |||
23 | # define __force | 23 | # define __force |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | #ifndef __weak | ||
27 | # define __weak __attribute__((weak)) | ||
28 | #endif | ||
29 | |||
26 | #endif | 30 | #endif |