This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Missing size_t declaration in UAPI
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Elichai Turkel <elichai dot turkel at gmail dot com>
- Cc: Christian Brauner <christian at brauner dot io>, linux-api at vger dot kernel dot org, libc-alpha <libc-alpha at sourceware dot org>
- Date: Sat, 09 Nov 2019 13:27:30 +0100
- Subject: Re: Missing size_t declaration in UAPI
- References: <CALN7hCJRe1uL6pd+VwgzDt=5giMVjvX+YpF28f5qbLOVCZf4GQ@mail.gmail.com> <04EB5627-FD42-4397-995B-FDF051CFCFB5@brauner.io> <CALN7hC+YmHGpniNKBiD03cBnTyO+cqXhrVvE7SdtgEb7GkG-LQ@mail.gmail.com>
* Elichai Turkel:
> I'm proposing to move `linux/tools/include/nolibc/nolibc.h` to the
> UAPI interface.
> It would then be included in `linux/types.h`
> Would love feedback before I work on a patch.
I do not think nolibc.h is a good starting point. The header is
pretty much incompatible with everything, including multiple
translation units that include it, so including it from
<linux/types.h> will not work.
>>> Currently compiling the following program fails:
>>> ```
>>> #include "linux/signal.h"
>>> void main(void){}
>>> ```
>>> Because of `./asm/signal.h:127:2: error: unknown type name ‘size_t’`.
>>>
>>> I tried patching with `#include <stddef.h>` but there's a local file
>>> with the same name overriding the include.
<stddef.h> is expected to be provided by the compiler. It's probably
easier to fix your build environment.