Re: Problems with compiling struct fd_set -- storage size isn't known

Linus Torvalds (torvalds@cs.helsinki.fi)
Tue, 9 Jul 1996 14:32:18 +0300 (EET DST)


On Tue, 9 Jul 1996, Brian Raymond Doherty wrote:
>
> The following test program is causing me problems under 2.0.4:
>
> #include <sys/types.h>
>
> int main() {
> struct fd_set a;
> }
>
> When I try to compile it, I get:
>
> thirteen:~# gcc -o test test.c
> test.c: In function `main':
> test.c:4: storage size of `a' isn't known
>
> This program compiles cleanly under kernel 2.0.0.
>
> Am I doing something wrong, or has something been broken?

You're doing something wrong (I think). Your program should just use

fd_set a;

without the "struct".. I'm told we shouldn't use "struct fd_set" due to
standards concerns..

Linus