This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sys/socket.h problem in Cygwin


On Thu, Aug 14, 2003 at 07:44:43AM -0700, Jack_Goral@NAI.com wrote:
> sys/socket.h includes cygwin/socket.h, this includes asm/socket.h which includes cygwin/if.h.
> 
> This way "struct sockaddr_in" is not there because it is defined in cygwin/in.h not cygwin/if.h.
> 
> Because of that I must do:
> 
> #include <cygwin/in.h>
> #include <sys/socket.h>
> 
> instead of only:
> 
> #include <sys/socket.h>
> 
> Is this a bug in Cygwin include headers for GCC 3.2 or I am doing something wrong?

AFAIK that's pretty normal.  On Linux -- as on Cygwin -- you'll have to
include netinet/in.h.  So just replace

  #include <cygwin/in.h>

by

  #include <netinet/in.h>

and it should be fine.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]