tools lib: Guard the strlcpy() header with __GLIBC__
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 61a6445e463a3152590352d8634131955f531c6e Gitweb: http://git.kernel.org/tip/61a6445e463a3152590352d8634131955f531c6e Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Fri, 8 Jul 2016 15:38:51 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Tue, 12 Jul 2016 15:20:29 -0300
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]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/include/linux/string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/include/linux/string.h +1 -1
@@ -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