[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170222230652.GA14373@altlinux.org>
Date: Thu, 23 Feb 2017 02:06:52 +0300
From: "Dmitry V. Levin" <ldv@...linux.org>
To: Alexey Dobriyan <adobriyan@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] 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.
Signed-off-by: Dmitry V. Levin <ldv@...linux.org>
---
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 d2b1215..c6d18aa 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
--
ldv
Powered by blists - more mailing lists