Module Compilation Error - Need proper header files.

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

 



 

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.

[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

Attachment: use_timer.c
Description: use_timer.c


[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