LKML Archive mirror
 help / color / mirror / Atom feed
* can't include headers
@ 2002-05-29 17:18 gndutm
  2002-05-30  8:21 ` David Woodhouse
  0 siblings, 1 reply; 2+ messages in thread
From: gndutm @ 2002-05-29 17:18 UTC (permalink / raw
  To: linux-kernel

hi,
I need to write a device driver under linux. I am using slackware linux  kernel 2.4.18. 
I have problem to include headers, here is some of my code:

#define __KERNEL__
#include <linux/config.h>      (ok) 

#ifdef CONFIG_MODVERSIONS
#define MODVERSIONS
#include <linux/modversions.h> (ok)
#endif

#include <linux/module.h>      (ok)
#include <linux/stddef.h>      (ok) 
#include <linux/kernel.h>      (ok)               
#include <linux/mm.h>          <--- can't include this one
 
Any comments is greatly appreciated.
Thanks alot.

Ganda



__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


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

* Re: can't include headers
  2002-05-29 17:18 can't include headers gndutm
@ 2002-05-30  8:21 ` David Woodhouse
  0 siblings, 0 replies; 2+ messages in thread
From: David Woodhouse @ 2002-05-30  8:21 UTC (permalink / raw
  To: gndutm; +Cc: linux-kernel


gndutm@netscape.net said:
> I need to write a device driver under linux. I am using slackware
> linux  kernel 2.4.18.  I have problem to include headers, here is some
> of my code:

> #define __KERNEL__ 
> #include <linux/config.h>      (ok) 

> #ifdef CONFIG_MODVERSIONS
> #define MODVERSIONS 
> #include <linux/modversions.h> (ok)
> #endif

No, this is not OK. Add a simple Makefile like the normal kernel ones 
and do something like 
	make -C /lib/modules/`uname -r`/build SUBDIRS=`pwd`

It's the only way to get the correct gcc options &c. 

--
dwmw2



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

end of thread, other threads:[~2002-05-30  8:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-29 17:18 can't include headers gndutm
2002-05-30  8:21 ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).