X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Fri, 24 Oct 2008 17:21:11 +0700 From: bjoe To: cygwin AT cygwin DOT com Subject: Re: struct iphdr in netinet/ip.h Message-ID: <20081024102110.GA3304@DWTC-B9> Mail-Followup-To: cygwin AT cygwin DOT com References: <20081017105228 DOT GH9289 AT calimero DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081017105228.GH9289@calimero.vinschen.de> User-Agent: Mutt/1.4.2.2i Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Thank for your quick answer Corinna, the BSD struct ip definition work fine on me. I realize cygwin development team have good reason not to add struct iphdr definition so I use your first solutions. regards, On Fri, Oct 17, 2008 at 12:52:28PM +0200, Corinna Vinschen wrote: > On Oct 17 16:56, bjoe wrote: > > Hi all, > > I am sorry for this newbie question > > I get this error messages when try to compile program in cygwin, but > > this program compiled successfully in Linux. > > > > $ gcc-4 test.c > > test.c: In function 'main': > > test.c:152: error: invalid application of 'sizeof' to incomplete type > > 'struct iphdr' > > test.c:153: error: invalid application of 'sizeof' to incomplete type > > 'struct iphdr' > > > > My investigation show me that cygwin not have iphdr difinitions in netinet/ip.h > > like Linux. I use cygwin 1.5.25(0.156/4/2), so maybe someone in this > > list can explain to me how to workaround this. > > Cygwin has the BSD defintion struct ip instead. Use that or define > struct iphdr along the lines of struct ip yourself. > > > Corinna > > -- > Corinna Vinschen Please, send mails regarding Cygwin to > Cygwin Project Co-Leader cygwin AT cygwin DOT com > Red Hat -- It is easy to say no when there is a deeper yes burning within -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/