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>
This commit is contained in:
Ingo Molnar
2013-10-01 13:26:13 +02:00
parent 7a10822a30
commit fb1c9185e3
6 changed files with 12 additions and 24 deletions

View File

@@ -23,4 +23,8 @@
# define __force
#endif
#ifndef __weak
# define __weak __attribute__((weak))
#endif
#endif