__STDC_VERSION__ : What C dialect c89, c99,gnu90 kernel compiies

67hz 67hz at protonmail.com
Wed May 20 11:13:20 EDT 2020


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, May 20, 2020 3:44 AM, Greg KH <greg at kroah.com> wrote:

> On Wed, May 20, 2020 at 10:30:53AM +0300, Lev R. Oshvang . wrote:
>
> > Hi All,
> > I am building out of tree kernel module.
>
> Did you read the kernel documentation for how to do this?
>
> > I am trying to include user-space lib into kernel module
>
> You can't do this, sorry, it's not allowed at all, unless you build the
> code for that library into your kernel module directly.
>
> What problem are you trying to solve with this?
>
> > This API gives me the following warning :
> > "STDC_VERSION" is not defined, evaluates to 0
> > But continues and resulted module works,
> > I see from https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html
> > that STDC_VERSION_ is a built-in gcc macro, so I think that evenh
> > kernel compilation should be able to see it.
>
> There is no standard c library within the kernel, sorry.
>

If you are curious which symbols are in the kernel's scope, i.e., what functions are available to the kernel, check out /proc/kallsyms.





More information about the Kernelnewbies mailing list