From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933846AbdBVXRM (ORCPT ); Wed, 22 Feb 2017 18:17:12 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:35934 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754743AbdBVXRE (ORCPT ); Wed, 22 Feb 2017 18:17:04 -0500 Date: Thu, 23 Feb 2017 02:06:52 +0300 From: "Dmitry V. Levin" To: Alexey Dobriyan , Andrew Morton , "Eric W. Biederman" Cc: linux-kernel@vger.kernel.org Subject: [PATCH] uapi: fix linux/sysctl.h userspace compilation errors Message-ID: <20170222230652.GA14373@altlinux.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Dmitry V. Levin --- 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 #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