diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-07-08 14:38:51 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-07-12 14:20:29 -0400 |
commit | 61a6445e463a3152590352d8634131955f531c6e (patch) | |
tree | b6650dc543a14ba05f8ec65a8e0c0304fa63254f /tools | |
parent | b31e3e3316a78e4a2cf23be8e0d47e5e5a025bde (diff) |
tools lib: Guard the strlcpy() header with __GLIBC__
Better to whitelist it for libraries that require it (glibc) than
blacklist it with the ones that don't (uclibc, musl libc, etc).
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-52ih0m63a2n63tanpy6yj682@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/include/linux/string.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/include/linux/string.h b/tools/include/linux/string.h index b466d0228b57..b96879477311 100644 --- a/tools/include/linux/string.h +++ b/tools/include/linux/string.h | |||
@@ -8,7 +8,7 @@ void *memdup(const void *src, size_t len); | |||
8 | 8 | ||
9 | int strtobool(const char *s, bool *res); | 9 | int strtobool(const char *s, bool *res); |
10 | 10 | ||
11 | #ifndef __UCLIBC__ | 11 | #ifdef __GLIBC__ |
12 | extern size_t strlcpy(char *dest, const char *src, size_t size); | 12 | extern size_t strlcpy(char *dest, const char *src, size_t size); |
13 | #endif | 13 | #endif |
14 | 14 | ||