[lkml]   [2003]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Linux 2.6.0-test6
On Mon, 29 Sep 2003, Chris Friesen wrote:
> Russell King wrote:
> > If a header has something like these:
> >
> > struct my_headers_struct {
> > struct task_struct *tsk;
> > };
> >
> > void my_function(struct task_struct *tsk);
> >
> > and gcc warns that "struct task_struct" has not been declared, please
> > don't think about adding another header. Just declare the structure
> > in the header file which needs it like this:
> >
> > struct task_struct;
> If I do that, make a change to task_struct, then run make, will the file
> get rebuilt?

No. But using that definition all you can do (without warnings) is passing
pointers to the struct around, which is OK.

If you want to play with the internals of the structure, you have to include
the right header file anyway.



Geert Uytterhoeven -- There's lots of Linux beyond ia32 --

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:48    [W:0.055 / U:5.344 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site