aboutsummaryrefslogtreecommitdiff
path: root/include/uapi/linux/sysctl.h
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2017-07-15 11:41:19 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2017-07-16 17:05:33 +1000
commit46f7f69c3e1a838c07725b7aa1ef547c5ad232b0 (patch)
tree939d8307bd044afe30cc9f709dc0f85af324d56a /include/uapi/linux/sysctl.h
parent3beb8be37f7e1347b18d4c43997b18a09fcc6c85 (diff)
uapi: fix linux/sysctl.h userspace compilation errors
Include <stddef.h> (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 <ldv@altlinux.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/uapi/linux/sysctl.h')
-rw-r--r--include/uapi/linux/sysctl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/uapi/linux/sysctl.h b/include/uapi/linux/sysctl.h
index e13d48058b8d..c6602bdd2a10 100644
--- a/include/uapi/linux/sysctl.h
+++ b/include/uapi/linux/sysctl.h
@@ -26,6 +26,10 @@
#include <linux/types.h>
#include <linux/compiler.h>
+#ifndef __KERNEL__
+#include <stddef.h> /* 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