From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH] uapi: fix asm/signal.h userspace compilation errors Date: Wed, 1 Mar 2017 17:20:50 +0100 Message-ID: References: <20170226010156.GA28831@altlinux.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <20170226010156.GA28831@altlinux.org> Sender: linux-m68k-owner@vger.kernel.org List-Id: linux-m68k@vger.kernel.org To: "Dmitry V. Levin" Cc: Russell King , Haavard Skinnemoen , Hans-Christian Egtvedt , Mikael Starvik , Jesper Nilsson , Yoshinori Sato , Tony Luck , Fenghua Yu , Geert Uytterhoeven , Ralf Baechle , David Howells , "James E.J. Bottomley" , Helge Deller , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Martin Schwidefsky , Heiko Carstens , "David S. Miller" On Sun, Feb 26, 2017 at 2:01 AM, Dmitry V. Levin wrote: > Include (guarded by #ifndef __KERNEL__) to fix asm/signal.h > userspace compilation errors like this: > > /usr/include/asm/signal.h:126:2: error: unknown type name 'size_t' > size_t ss_size; > > As no uapi header provides a definition of size_t, inclusion > of seems to be the most conservative fix available. > > On the kernel side size_t is typedef'ed to __kernel_size_t, so > an alternative fix would be to change the type of sigaltstack.ss_size > from size_t to __kernel_size_t for all architectures except those where > sizeof(size_t) < sizeof(__kernel_size_t), namely, x32 and mips n32. > > On x32 and mips n32, however, #include seems to be the most > straightforward way to obtain the definition for sigaltstack.ss_size's > type. > > Signed-off-by: Dmitry V. Levin I'm not sure if this is the best fix. We generally should not include one standard header from another standard header. Would it be possible to use __kernel_size_t instead of size_t? Arnd