From 4ddd32741da87657113d964588ce13ee64b34820 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Mon, 16 Nov 2015 11:36:29 -0300 Subject: tools: Adopt memdup() from tools/perf, moving it to tools/lib/string.c That will contain more string functions with counterparts, sometimes verbatim copies, in the kernel. Acked-by: Wang Nan Cc: Adrian Hunter Cc: Alexey Dobriyan Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/n/tip-rah6g97kn21vfgmlramorz6o@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/include/linux/string.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tools/include/linux/string.h (limited to 'tools/include') diff --git a/tools/include/linux/string.h b/tools/include/linux/string.h new file mode 100644 index 000000000000..f3a6db6ad732 --- /dev/null +++ b/tools/include/linux/string.h @@ -0,0 +1,9 @@ +#ifndef _TOOLS_LINUX_STRING_H_ +#define _TOOLS_LINUX_STRING_H_ + + +#include /* for size_t */ + +void *memdup(const void *src, size_t len); + +#endif /* _LINUX_STRING_H_ */ -- cgit v1.2.1