diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/uaccess.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h index b218b85..ac68c99 100644 --- a/include/asm-generic/uaccess.h +++ b/include/asm-generic/uaccess.h @@ -288,14 +288,16 @@ strncpy_from_user(char *dst, const char __user *src, long count) * * Return 0 on exception, a value greater than N if too long */ -#ifndef strnlen_user +#ifndef __strnlen_user +#define __strnlen_user strnlen +#endif + static inline long strnlen_user(const char __user *src, long n) { if (!access_ok(VERIFY_READ, src, 1)) return 0; - return strlen((void * __force)src) + 1; + return __strnlen_user(src, n); } -#endif static inline long strlen_user(const char __user *src) { |