From c1a39663935eab88c090bbf2219dd52ad7b27030 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sat, 25 Feb 2017 11:24:05 +1100 Subject: [PATCH 01/23] uapi: fix linux/sysctl.h userspace compilation errors Include (guarded by #ifndef __KERNEL__) to fix the following linux/sysctl.h userspace compilation errors: /usr/include/linux/sysctl.h:38:2: error: unknown type name 'size_t' size_t *oldlenp; /usr/include/linux/sysctl.h:40:2: error: unknown type name 'size_t' size_t newlen; This also fixes userspace compilation of uapi headers that include linux/sysctl.h, e.g. linux/netfilter.h. Link: http://lkml.kernel.org/r/20170222230652.GA14373@altlinux.org Signed-off-by: Dmitry V. Levin Cc: Alexey Dobriyan Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton --- include/uapi/linux/sysctl.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/uapi/linux/sysctl.h b/include/uapi/linux/sysctl.h index e13d480..c6602bdd2 100644 --- a/include/uapi/linux/sysctl.h +++ b/include/uapi/linux/sysctl.h @@ -26,6 +26,10 @@ #include #include +#ifndef __KERNEL__ +#include /* For size_t. */ +#endif + #define CTL_MAXNAME 10 /* how many path components do we allow in a call to sysctl? In other words, what is the largest acceptable value for the nlen -- ldv