Adding #includes in new elements
Eddie Kohler
kohler at aciri.org
Mon Aug 6 19:15:02 EDT 2001
Hey Henry,
So the deal here is that you are including a kernel header file
(<linux/sched.h>) and a user-level header file (<time.h>) in the same
function. That's bad news. You should include at most one.
If your element is not meant to compile at user level, then add an
ELEMENT_REQUIRES(linuxmodule) statmenet to the element source code. (See
elements/linuxmodule/*.cc for examples.)
If your element compiles in both places, use "#ifdef CLICK_LINUXMODULE" and
"#ifdef CLICK_USERLEVEL" to select which header files to include.
Let us know if there are more problems!
love,
ed
More information about the click
mailing list