* Wilbert de Graaf <[EMAIL PROTECTED]> [000712 19:11] wrote:
>
> Maybe obvious to some of you, but I had to define two new structures (as
> described in an ietf draft) in <netinet/in.h>. This in order to be able to
> support igmpv3 / multicast source filters. Anyway, these structures require
> 'struct sockaddr_storage' which is defined in <sys/socket.h>.
> When I compiled the code, it stopped since several source files only include
> <netinet/in.h> and not <sys/socket.h>. To solve this I added these 3 lines
>
> #ifndef _SYS_SOCKET_H
> #include <sys/socket.h>
> #endif
>
> somewhere in the top of <netinet/in.h>. I want to verify if this is indeed
> the best way to solve it ?
No, the proper solution is to do a forward struct declaration like so:
struct something;
struct bigger_something {
struct something foo;
}
--
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
"I have the heart of a child; I keep it in a jar on my desk."
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message