Sorry, the problem is solved. It was my
mistake. By mistake I defined __KERNEL rather than
__KERNEL__ Can some one put some light on the method
to resolve the issue of required header files for our code. How can we come to
know what header files are need for our code ? Regards, Gaurav. From: kernelnewbies-bounce@xxxxxxxxxxxx
[mailto:kernelnewbies-bounce@xxxxxxxxxxxx] On
Behalf Of Hi All, I have written a small module code for using kernel timer
capability (just for practice). When I compile it, it throws errors. I think the problem is that
proper header files have not been included. I am attaching the code and the compiler output. Please let
me know where I went wrong. If it is an issue of header files, please let me
know which file I need to include. The compiler output is as follows: [root@dhiga01-xp1 kernel_timer_progs]# gcc
-D__KERNEL -DMODULE -I/usr/src/linux-2.4/include -Wall -O -o my_timer.o
use_timer.c In file included from use_timer.c:20: /usr/src/linux-2.4/include/linux/timer.h:11:
field `entry' has incomplete type /usr/src/linux-2.4/include/linux/timer.h:38:
confused by earlier errors, bailing out Can some one tell me how can we resolve or come to know
which kernel header files are required by our code. As our code might be using
number of functionalities of kernel, we need to include all required header
files, please let me know how to resolve such a situation of knowing the exact
header files need to be included. Thanks in advance. Regards, Gaurav. |