Timur Tabi wrote:
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
I found the solution. For some reason, Red Hat 9.0 requires rhconfig.h to be included before modversions.h. So I changed the above to:
ifdef CONFIG_MODVERSIONS ifeq ($(OS), rh90) CFLAGS += -include $(LINUX)/include/linux/rhconfig.h endif CFLAGS += -DMODVERSIONS -include $(LINUX)/include/linux/modversions.h endif
(Note: "OS" and "LINUX" are variables defined elsewhere in my makefile. Their values should be obvious.)
-- 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/