diff options
author | Dominik Sliwa <dominik.sliwa@toradex.com> | 2017-11-21 12:59:41 +0000 |
---|---|---|
committer | Dominik Sliwa <dominik.sliwa@toradex.com> | 2017-12-22 09:40:23 +0000 |
commit | e34cb44ac7c08783b98a16eec70125e205e6eb12 (patch) | |
tree | 1101d23f1a73e5627ae187b07c7a0cf8826e10d1 /backport-include/linux/string.h |
initial commit
Generated againts 4.14 kernel source with
git backports 1d8cc151d365582b42be00af776270b834a7a37d
Diffstat (limited to 'backport-include/linux/string.h')
-rw-r--r-- | backport-include/linux/string.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/backport-include/linux/string.h b/backport-include/linux/string.h new file mode 100644 index 0000000..b85d9c7 --- /dev/null +++ b/backport-include/linux/string.h @@ -0,0 +1,32 @@ +#ifndef __BACKPORT_LINUX_STRING_H +#define __BACKPORT_LINUX_STRING_H +#include_next <linux/string.h> +#include <linux/version.h> + +#if LINUX_VERSION_IS_LESS(4,5,0) +#define memdup_user_nul LINUX_BACKPORT(memdup_user_nul) +extern void *memdup_user_nul(const void __user *, size_t); +#endif + +/* this was added in v3.2.65, v3.4.106, v3.10.60, v3.12.33, v3.14.24, + * v3.17.3 and v3.18 */ +#if !(LINUX_VERSION_IS_GEQ(3,17,3) || \ + (LINUX_VERSION_IS_GEQ(3,14,24) && \ + LINUX_VERSION_IS_LESS(3,15,0)) || \ + (LINUX_VERSION_IS_GEQ(3,12,33) && \ + LINUX_VERSION_IS_LESS(3,13,0)) || \ + (LINUX_VERSION_IS_GEQ(3,10,60) && \ + LINUX_VERSION_IS_LESS(3,11,0)) || \ + (LINUX_VERSION_IS_GEQ(3,4,106) && \ + LINUX_VERSION_IS_LESS(3,5,0)) || \ + (LINUX_VERSION_IS_GEQ(3,2,65) && \ + LINUX_VERSION_IS_LESS(3,3,0))) +#define memzero_explicit LINUX_BACKPORT(memzero_explicit) +void memzero_explicit(void *s, size_t count); +#endif + +#if LINUX_VERSION_IS_LESS(4,3,0) +ssize_t strscpy(char *dest, const char *src, size_t count); +#endif + +#endif /* __BACKPORT_LINUX_STRING_H */ |