Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2003:
[Freeciv-Dev] Re: (PR#2527) solaris warnings
Home

[Freeciv-Dev] Re: (PR#2527) solaris warnings

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2527) solaris warnings
From: "Reinier Post" <rp@xxxxxxxxxx>
Date: Wed, 4 Jun 2003 10:14:43 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Raimar wrote:

[...]

> > Lines in question:
> > 
> >     struct sockaddr_in *sock = NULL;
> > ...
> >     sock = (struct sockaddr_in *) sa;
> > 
> > Any ideas?
> 
> Seems odd since sa is "struct sockaddr *".  [...]


From the Solaris 7 header files on my system:

/* in netinet/in.h */
struct sockaddr {
        sa_family_t     sa_family;      /* address family */
        char            sa_data[14];    /* up to 14 bytes of direct address */
};

/* in sys/socket.h */
struct sockaddr_in {
        sa_family_t     sin_family;
        in_port_t       sin_port;
        struct  in_addr sin_addr;
#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
        char            sin_zero[8];
#else
        unsigned char   sin_zero[8];
#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
};

-- 
Reinier





[Prev in Thread] Current Thread [Next in Thread]