[ntp:bugs] [Bug 718] type of saddrlen arg is wrong for getsockname()

bugzilla at ntp.isc.org bugzilla at ntp.isc.org
Tue Oct 10 20:15:48 UTC 2006


http://bugs.ntp.isc.org/718



----------------------------------------------------------------------------
Additional Comments From kurt at roeckx.be ()
Submitted on 2006-10-10 20:15

There are several implementations that use a different types.

Originaly it was an "int *", then it got changed to an "size_t *", and then to
an "socklen_t *". So depending on the OS, you get something else.

On Linux on an s390, size_t is an unsigned long for some reason, and socklen_t
is an unsigned int.

See http://autoconf-archive.cryp.to/ac_func_accept_argtypes.html for a script
that  checks all variants.  You can then use ACCEPT_TYPE_ARG3 in your source to
get the right type.

Kurt


-- 
 <kurt at roeckx.be>



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


More information about the bugs mailing list