Why do some kernels need "-DMODVERSIONS -include linux/modversions.h" ?

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

 



I have a driver that compiles under several different 2.4 and 2.6 kernels. It uses a number of tricks (mostly in the makefile) to determine what code to compile.

One particular kernel has me confused, however. This is a customized kernel from a particular vendor, and I think it's based on Red Hat 8.0 or something equally old. The kernel version is 2.4.25-14.

The problem I'm having is that in order to insmod my driver, I need to specify "-DMODVERSIONS -include linux/modversions.h" on the gcc command line.

So I have two questions:

1) What is it about this particular kernel that requires modversion.h included?

2) Is there any characteristic of any of the kernel header or source files that I can scan for to allow me to know in advance whether I need
modversions.h?


--
Timur Tabi
Staff Software Engineer
timur.tabi@xxxxxxxxxxx

--
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