When executing "make" on my newly installed RedHat 7.0 the following message is received: #make gcc_D_KERNEL__ -DMODULE -w -02 -fomit-frame-pointer -I/usr/src/linux/include -c -o serial.a serial.c In file included from serial.c:131: /usr/include/linux/modversions.h:1:2: #error Modules should never use kernel-headers system headers, /usr/include/linux/modversions.h:2:2: #error but headers from an appropriate kernel source make: *** [serial.a] Error 1 -the Makefile for this module is exacutable in Mandrake 7.1(my previous OS) -I used the make program from Mandrake in RedHat and the same error occurred -thus the error is not from the module or the make program Bryaan Phillips boogiebryan
The error message is trying to prevent errors caused from mis-matches between glibc and kernel headers For the vast majority of programs the error message is needed to prevent subtle errors. Judging from the name of your program "serial.c", your program may be one of the handful of programs that might need to include kernel headers, dunno, can't tell without more info. You should look carefully for glibc equivalent structures and methods to perform the same task.