MODVERSIONS problem

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

 



I have a driver that is built outside of the kernel tree. Our code handles different versions of the kernel (2.4 and 2.6), and recently we came across a kernel that needs to have MODVERSIONS enabled. So, I added these lines to my makefile:

include ${LINUX}/.config
ifdef CONFIG_MODVERSIONS
CFLAGS += -DMODVERSIONS -include $(LINUX)/include/linux/modversions.h
endif

Although this fixes the problem with the new kernel, it breaks with the Red Hat 9.0 kernel. I got hundreds of errors when I try to compile, like these:

In file included from devnet.c:11:
/usr/ammasso/src/rh90/2.4.20-6smp-32/include/asm/processor.h:82: invalid suffix on integer constant
/usr/ammasso/src/rh90/2.4.20-6smp-32/include/asm/processor.h:82: parse error before numeric constant
/usr/ammasso/src/rh90/2.4.20-6smp-32/include/asm/processor.h:265: invalid suffix on integer constant
/usr/ammasso/src/rh90/2.4.20-6smp-32/include/asm/processor.h:265: parse error before numeric constant
cc1: warnings being treated as errors
/usr/ammasso/src/rh90/2.4.20-6smp-32/include/asm/processor.h:269: warning: parameter names (without types) in function declaration
/usr/ammasso/src/rh90/2.4.20-6smp-32/include/asm/processor.h:450: invalid suffix on floating constant
/usr/ammasso/src/rh90/2.4.20-6smp-32/include/asm/processor.h:450: parse error before numeric constant
/usr/ammasso/src/rh90/2.4.20-6smp-32/include/asm/processor.h:450: `kernel_thread_R_ver_str' declared as function returning a function


When I look at my .config file, I see "CONFIG_MODVERSIONS=y". Why is that my driver compiles when I don't include modversions.h? Shouldn't it have been broken all along?

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