diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-11-16 11:36:29 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-11-18 17:51:02 -0300 |
commit | 4ddd32741da87657113d964588ce13ee64b34820 (patch) | |
tree | c6ef98fadb95631fb72bf05c45a6f97b9ca92c04 /tools/include | |
parent | 9a13c6587e2f0d5e80ce02f5f9ef62788b48d163 (diff) | |
download | linux-4ddd32741da87657113d964588ce13ee64b34820.tar.gz linux-4ddd32741da87657113d964588ce13ee64b34820.tar.bz2 linux-4ddd32741da87657113d964588ce13ee64b34820.zip |
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 <wangnan0@huawei.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/tip-rah6g97kn21vfgmlramorz6o@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/include')
-rw-r--r-- | tools/include/linux/string.h | 9 |
1 files changed, 9 insertions, 0 deletions
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 <linux/types.h> /* for size_t */ + +void *memdup(const void *src, size_t len); + +#endif /* _LINUX_STRING_H_ */ |