[FFmpeg-devel] [PATCH] gethostbyname_r

Nicolas George nicolas.george
Thu Aug 2 17:57:06 CEST 2007


Hi.

Le quintidi 15 thermidor, an CCXV, Ronald S. Bultje a ?crit?:
> attached patch changes the meaning of the av_resolve_host function signature
> to not just be -1, but actually contain herrno code information. For this,
> we use gethostbyname() or gethostbyname_r(), which is also added in this
> patch.

gethostbyname_r is not standard, and gethostbyname is obsolete. New
applications are supposed to use getaddrinfo, which is thread-safe and
protocol independent. And standard.

getaddrinfo is already used in libavformat/udp.c, in udp_ipv6_resolve_host,
but it is not IPv6-specific.

I believe that, although it would probably mean a little more work, using
getaddrinfo by default everywhere would be a cleaner solution.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 185 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070802/97d9c851/attachment.pgp>



More information about the ffmpeg-devel mailing list