Skip to content

Commit 61a6445

Browse files
committed
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>
1 parent b31e3e3 commit 61a6445

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/include/linux/string.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ void *memdup(const void *src, size_t len);
88

99
int strtobool(const char *s, bool *res);
1010

11-
#ifndef __UCLIBC__
11+
#ifdef __GLIBC__
1212
extern size_t strlcpy(char *dest, const char *src, size_t size);
1313
#endif
1414

0 commit comments

Comments
 (0)