From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934635AbdBWBjt (ORCPT ); Wed, 22 Feb 2017 20:39:49 -0500 Received: from out03.mta.xmission.com ([166.70.13.233]:53321 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933510AbdBWBjm (ORCPT ); Wed, 22 Feb 2017 20:39:42 -0500 From: ebiederm@xmission.com (Eric W. Biederman) To: "Dmitry V. Levin" Cc: Alexey Dobriyan , Andrew Morton , linux-kernel@vger.kernel.org References: <20170222230652.GA14373@altlinux.org> Date: Thu, 23 Feb 2017 14:34:58 +1300 In-Reply-To: <20170222230652.GA14373@altlinux.org> (Dmitry V. Levin's message of "Thu, 23 Feb 2017 02:06:52 +0300") Message-ID: <87poi93d19.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1cgiNb-0003Dm-4e;;;mid=<87poi93d19.fsf@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=101.100.131.232;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1+MBJuI033tzctweOe1AuOatMyEYVpV8mY= X-SA-Exim-Connect-IP: 101.100.131.232 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.7 XMSubLong Long Subject * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.4977] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;"Dmitry V. Levin" X-Spam-Relay-Country: X-Spam-Timing: total 5301 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 2.9 (0.1%), b_tie_ro: 2.1 (0.0%), parse: 0.74 (0.0%), extract_message_metadata: 11 (0.2%), get_uri_detail_list: 1.09 (0.0%), tests_pri_-1000: 6 (0.1%), tests_pri_-950: 1.15 (0.0%), tests_pri_-900: 0.97 (0.0%), tests_pri_-400: 20 (0.4%), check_bayes: 19 (0.3%), b_tokenize: 6 (0.1%), b_tok_get_all: 5 (0.1%), b_comp_prob: 1.97 (0.0%), b_tok_touch_all: 3.5 (0.1%), b_finish: 0.71 (0.0%), tests_pri_0: 155 (2.9%), check_dkim_signature: 0.47 (0.0%), check_dkim_adsp: 3.1 (0.1%), tests_pri_500: 5101 (96.2%), poll_dns_idle: 5094 (96.1%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH] uapi: fix linux/sysctl.h userspace compilation errors X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "Dmitry V. Levin" writes: > 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. Are these compilation errors new? Perhaps we should just refactor linux/netfilter.h not to depend on linux/sysctl.h. The definitions in linux/sysctl.h are essentially dead at this point and I would not expect any new, are really not any old programs to depend on linux/sysctl.h. As I don't expect new users of linux/sysctl.h I don't see how changing anything in the header is meaningful. Either the old users work or the old users are broken. Eric > 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