Re: socklen_t
Re: socklen_t
On Thu, Aug 09, 2001 at 03:10:52PM -0500, Chilton Webb wrote:
>
I'm trying to include some sockets code from Stevens' Unix Network
>
Programming book and it's choking on "socklen_t". According to the book,
>
this is a fairly standard variable type. Do I need to include a
>
particular header file that I normally (on Unix) would not? Thoughts?
Check the man page for the function you're trying to use; there's a
little bit of variation from OS to OS. For instance, "man bind" on
Solaris 2.7 shows:
int bind(int s, const struct sockaddr *name, socklen_t *namelen);
but on OS X:
int bind(int s, const struct sockaddr *name, int namelen)
The man pages also list the header files you need (sys/types.h and
sys/socket.h).
References: | |
| >socklen_t (From: Chilton Webb <email@hidden>) |