[FFmpeg-devel] [PATCH/RFC] Prefer getaddrinfo over gethostbyname
Martin Storsjö
martin
Wed Jan 20 12:01:48 CET 2010
On Tue, 12 Jan 2010, Ronald S. Bultje wrote:
> On Tue, Jan 12, 2010 at 2:17 PM, Dave Yeo <daveryeo at telus.net> wrote:
> > FYI sa_len is implemented like this here (the TCPV40HDRS are depreciated) on
> > OS/2
> >
> > struct sockaddr {
> > #ifdef TCPV40HDRS
> > ? ? ? ?u_short sa_family; ? ? ? ? ? ? ?/* address family */
> > ? ? ? ?char ? ?sa_data[14]; ? ? ? ? ? ?/* up to 14 bytes of direct address
> > */
> > #else
> > ? ? ? ?u_char ?sa_len; ? ? ? ? ? ? ? ? /* total length */
> > ? ? ? ?u_char ?sa_family; ? ? ? ? ? ? ?/* address family */
> > ? ? ? ?char ? ?sa_data[14]; ? ? ? ? ? ?/* actually longer; address value */
> > #endif
> > };
>
> could you implement a configure check and the above, which works?
What about the attached patches? They use the newly added check_struct in
configure, to check for the sa_len field, and then provide a RFC 3493
compliant struct sockaddr_storage based on this info.
This version can of course break, too, if some platform has some really
weird version of sockaddr, but it should at least handle these both
variations.
// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Check-for-the-sa_len-member-in-struct-sockaddr.patch
Type: text/x-diff
Size: 1298 bytes
Desc:
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100120/70949001/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-proper-fields-to-the-struct-sockaddr_storage-rep.patch
Type: text/x-diff
Size: 1129 bytes
Desc:
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100120/70949001/attachment-0001.patch>
More information about the ffmpeg-devel
mailing list