Skip to content

Commit

Permalink
tools lib: Guard the strlcpy() header with __GLIBC__
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnaldo Carvalho de Melo committed Jul 12, 2016
1 parent b31e3e3 commit 61a6445
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/include/linux/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 61a6445

Please sign in to comment.