Adding #includes in new elements

Henry Owen henry.owen at smyrnacable.net
Mon Aug 6 19:28:43 EDT 2001


I would like to use the following code in a new element:

struct task_struct  *pxtask;

for_each_task(pxtask){
.......
}

In order to use for_each_task() I think I need to #include <linux/sched.h>
As a test, prior to adding any code to a working element I just add the
#include <linux/sched.h>  and use make

When I do this I get lots of errors like
In file included from /usr/include/linux/timex.h
     /usr/include/linux/time.h redefinition of struct timespec
     /usr/include/time.h previous definition here

How in general should I add #includes for "existing" kernel structures and
functions? I think click does this using a very specific method that I do
not grasp at present :>)

Thanks for any suggestions,

Henry




More information about the click mailing list