Re: kernel version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- Ramakrishnan <aramki@sasken.com> wrote:
> Rupa wrote:
> > In my source file, i have included
> > 
> > #include <linux/version.h>
> > 
> > and also i complied using this option
> > 
> > gcc -D__MODULE__ -I/usr/include/linux-2.4/include -c <modulename>
> > 
> >  
> > 
> > But even then iam getting same error.
> > 
> >  

It is my understanding that kernel modules require the following
flags for correct compilation:

gcc -D__KERNEL__ -DMODULE -O2 -Wall -I<includedir> -c <modulename>

Perhaps -D_KERNEL__ will help?

I know that you need -O2 optimization for a kernel module...and
showing all warnings can't hurt...  ;-)

Harmony,

--Christine


__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux