lkml.org 
[lkml]   [2016]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 31/66] tools lib: Guard the strlcpy() header with __GLIBC__
Date
From: Arnaldo Carvalho de Melo <acme@redhat.com>

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>
---
tools/include/linux/string.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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

--
2.7.4
\
 
 \ /
  Last update: 2016-07-13 01:41    [W:0.211 / U:8.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site