aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <[email protected]>2016-07-08 15:38:51 -0300
committerArnaldo Carvalho de Melo <[email protected]>2016-07-12 15:20:29 -0300
commit61a6445e463a3152590352d8634131955f531c6e (patch)
treeb6650dc543a14ba05f8ec65a8e0c0304fa63254f
parentb31e3e3316a78e4a2cf23be8e0d47e5e5a025bde (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 <[email protected]> Cc: Alexey Brodkin <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Vineet Gupta <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/include/linux/string.h2
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);
int strtobool(const char *s, bool *res);
-#ifndef __UCLIBC__
+#ifdef __GLIBC__
extern size_t strlcpy(char *dest, const char *src, size_t size);
#endif