Subject: Re: [PATCH] Fix gcc-4 warning in accept() call

From: "H. Peter Anvin" <[email-masked]>
Date: Thu, 29 Sep 2005 21:46:18 -0700

Pavel Roskin wrote:
> Quoting Horst von Brand <[email-masked]>:
> 
> 
>>>+				unsigned int sslen = sizeof(ss);
>>
>>Shouldn't this be size_t?
> 
> 
> No.  That would actually break things on big-endian 64-bit platforms.
> 
> You can see "info libc" for the whole story.  My (limited!) understanding is
> that it should be 32-bit for compatibility reasons, so socklen_t was a trick to
> fool size_t proponents from the POSIX committee :-)
> 

Formally it should be "socklen_t" or "int".  It should *not* be 
"unsigned int"!

	-hpa