[Live-devel] sin_len on *BSD not initialized

Ross Finlayson finlayson at live555.com
Sun Dec 4 23:43:11 PST 2005


>I just tried running vobStreamer on FreeBSD and encountered that
>the sin_len field of sockaddr_in is not initialized by the
>libraries, making the programs fail on FreeBSD.

Interesting...  I haven't encountered this problem with FreeBSD, but 
perhaps because I'm using an older version.


>To make the code runnable on *BSD, I suggest that a
>"HAVE_SOCKADDR_LEN" flag should be defined in the config*.h files
>for appropriate systems and that
>
>     #ifdef HAVE_SOCKADDR_LEN
>     address.sin_len = sizeof(address);
>     #endif
>
>is added to the corresponding code places (which can be found by
>looking for sin_family).
>
>Is there anyone who can make the patches to the code?

I have made a change like this in the latest version (2005.12.05) of 
the code.  The code now uses a macro "MAKE_SOCKADDR_IN()" (defined in 
"groupsock/include/GroupsockHelper.hh")  This macro sets the 
"sin_len" field iff "HAVE_SOCKADDR_LEN" is defined on the command line.


	Ross Finlayson
	Live Networks, Inc. (LIVE555.COM)
	<http://www.live555.com/>



More information about the live-devel mailing list