From owner-freebsd-hackers Wed Jul 12 22:15:31 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id BBADE37C2DD for ; Wed, 12 Jul 2000 22:15:28 -0700 (PDT) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e6D5FQC10049; Wed, 12 Jul 2000 22:15:26 -0700 (PDT) Date: Wed, 12 Jul 2000 22:15:26 -0700 From: Alfred Perlstein To: Wilbert de Graaf Cc: FreeBSD-hackers Subject: Re: #include question: requires Message-ID: <20000712221526.L25571@fw.wintelcom.net> References: <095401bfec6f$495ba110$0a00a8c0@alias> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <095401bfec6f$495ba110$0a00a8c0@alias>; from wilbertdg@hetnet.nl on Wed, Jul 12, 2000 at 07:08:47PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Wilbert de Graaf [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 . This in order to be able to > support igmpv3 / multicast source filters. Anyway, these structures require > 'struct sockaddr_storage' which is defined in . > When I compiled the code, it stopped since several source files only include > and not . To solve this I added these 3 lines > > #ifndef _SYS_SOCKET_H > #include > #endif > > somewhere in the top of . 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 - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message