
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>
31 lines
504 B
C
31 lines
504 B
C
#ifndef _PERF_LINUX_COMPILER_H_
|
|
#define _PERF_LINUX_COMPILER_H_
|
|
|
|
#ifndef __always_inline
|
|
# define __always_inline inline __attribute__((always_inline))
|
|
#endif
|
|
|
|
#define __user
|
|
|
|
#ifndef __attribute_const__
|
|
# define __attribute_const__
|
|
#endif
|
|
|
|
#ifndef __maybe_unused
|
|
# define __maybe_unused __attribute__((unused))
|
|
#endif
|
|
|
|
#ifndef __packed
|
|
# define __packed __attribute__((__packed__))
|
|
#endif
|
|
|
|
#ifndef __force
|
|
# define __force
|
|
#endif
|
|
|
|
#ifndef __weak
|
|
# define __weak __attribute__((weak))
|
|
#endif
|
|
|
|
#endif
|