mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* why can't include /sys/types and /linux/fs.h in the same file
@ 2001-04-14 11:39 vivid_liou
  2001-04-14 11:47 ` Philip Blundell
  0 siblings, 1 reply; 2+ messages in thread
From: vivid_liou @ 2001-04-14 11:39 UTC (permalink / raw)
  To: linux-kernel



Dear All:
I wrote a very small program as following :
#include <kernel/fs.h>
#include <sys/types.h>
int main ()
{
;  // contains no C programs,
}
and give the command " cc  -D__KERNEL__ -I/usr/src/linux/include  to compiler
the program .
A lot of parser error messages show on the screen .
Does anybody know why ?



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: why can't include /sys/types and /linux/fs.h in the same file
  2001-04-14 11:39 why can't include /sys/types and /linux/fs.h in the same file vivid_liou
@ 2001-04-14 11:47 ` Philip Blundell
  0 siblings, 0 replies; 2+ messages in thread
From: Philip Blundell @ 2001-04-14 11:47 UTC (permalink / raw)
  To: vivid_liou; +Cc: linux-kernel

>#include <kernel/fs.h>
>#include <sys/types.h>
>int main ()
>{
>;  // contains no C programs,
>}
>and give the command " cc  -D__KERNEL__ -I/usr/src/linux/include  to compiler
>the program .

You can't mix environments.  Either you're building part of the kernel, in which 
case you need to use -D__KERNEL__ and <linux/*> headers, or you're building an 
application, in which case you need to use the headers from libc.

p.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-04-14 11:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-14 11:39 why can't include /sys/types and /linux/fs.h in the same file vivid_liou
2001-04-14 11:47 ` Philip Blundell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®