Kernel Newbies archive on lore.kernel.org
 help / color / Atom feed
From: Greg KH <greg@kroah.com>
To: "Lev R. Oshvang ." <levonshe@gmail.com>
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: __STDC_VERSION__ : What C dialect c89, c99,gnu90 kernel compiies
Date: Wed, 20 May 2020 10:44:04 +0200
Message-ID: <20200520084404.GB2837844@kroah.com> (raw)
In-Reply-To: <CAP22eLFq0rGFOVShsF0oZmBLWo70d79s1GYK=RKXAbaExdVwLQ@mail.gmail.com>

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.

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20  7:30 Lev R. Oshvang .
2020-05-20  8:44 ` Greg KH [this message]
2020-05-20 15:13   ` 67hz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200520084404.GB2837844@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=levonshe@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org
	public-inbox-index kernelnewbies

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git