Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1591239
| From | "Dmitry V. Levin" <ldv@altlinux.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] uapi: fix asm/signal.h userspace compilation errors |
| Date | 2017-03-02 17:10 +0100 |
| Message-ID | <tgBsJ-4MC-17@gated-at.bofh.it> (permalink) |
| References | <teVvA-7L7-11@gated-at.bofh.it> <tgfiy-5AK-17@gated-at.bofh.it> <tgAQ1-4iq-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Thu, Mar 02, 2017 at 10:22:18AM -0500, Carlos O'Donell wrote: > On Wed, Mar 1, 2017 at 11:20 AM, Arnd Bergmann <arnd@arndb.de> wrote: > > On Sun, Feb 26, 2017 at 2:01 AM, Dmitry V. Levin <ldv@altlinux.org> wrote: > >> Include <stddef.h> (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 <stddef.h> seems to be the most conservative fix available. [...] > > 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? > > In glibc we handle this with special use of __need_size_t with GCC's > provided stddef.h. > > For example glibc's signal.h does this: > > # define __need_size_t > # include <stddef.h> Just to make it clear, do you suggest this approach for asm/signal.h as well? [...] > Changing the fundamental type causes the issues you see in patch v2 > where sizeof(size_t) < sizeof(__kernel_size_t). > > It will only lead to problem substituting the wrong type. I don't see any appetite for creating more ABIs like x32 with sizeof(size_t) < sizeof(__kernel_size_t), so v2 approach is not going to be any different from v1 in maintenance. -- ldv
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] uapi: fix asm/signal.h userspace compilation errors Arnd Bergmann <arnd@arndb.de> - 2017-03-01 17:30 +0100
[PATCH v2] x86/uapi: fix asm/signal.h userspace compilation error "Dmitry V. Levin" <ldv@altlinux.org> - 2017-03-02 01:20 +0100
Re: [PATCH v2] x86/uapi: fix asm/signal.h userspace compilation error hpa@zytor.com - 2017-03-02 01:30 +0100
Re: [PATCH v2] x86/uapi: fix asm/signal.h userspace compilation error "Dmitry V. Levin" <ldv@altlinux.org> - 2017-03-02 02:30 +0100
[PATCH v3 2/2] x86/uapi: fix asm/signal.h userspace compilation error "Dmitry V. Levin" <ldv@altlinux.org> - 2017-03-03 02:50 +0100
[PATCH 1/2] uapi: introduce __kernel_uapi_size_t "Dmitry V. Levin" <ldv@altlinux.org> - 2017-03-03 02:50 +0100
[PATCH v2] uapi: fix asm/signal.h userspace compilation errors "Dmitry V. Levin" <ldv@altlinux.org> - 2017-03-02 01:30 +0100
Re: [PATCH] uapi: fix asm/signal.h userspace compilation errors "Carlos O'Donell" <carlos@systemhalted.org> - 2017-03-02 16:30 +0100
Re: [PATCH] uapi: fix asm/signal.h userspace compilation errors "Dmitry V. Levin" <ldv@altlinux.org> - 2017-03-02 17:10 +0100
Re: [PATCH] uapi: fix asm/signal.h userspace compilation errors "Carlos O'Donell" <carlos@systemhalted.org> - 2017-03-04 02:30 +0100
Re: [PATCH] uapi: fix asm/signal.h userspace compilation errors "Carlos O'Donell" <carlos@systemhalted.org> - 2017-03-06 16:20 +0100
csiph-web