[FFmpeg-devel] [PATCH/RFC] Prefer getaddrinfo over gethostbyname

Ronald S. Bultje rsbultje
Wed Jan 20 18:26:54 CET 2010


On Wed, Jan 20, 2010 at 10:37 AM, Martin Storsj? <martin at martin.st> wrote:
> On Wed, 20 Jan 2010, Ronald S. Bultje wrote:
>> 2010/1/20 M?ns Rullg?rd <mans at mansr.com>:
>> > Why don't you use the system struct sockaddr instead of trying to
>> > replicate it? ?If it's not big enough for ipv6 addresses, the system
>> > clearly doesn't support ipv6 in the first place.
>> See RFC-2553 (http://www.rfc-editor.org/rfc/rfc2553.txt). struct
>> sockaddr_storage is expected to be of that size and should contain a
>> ss_family member at the very least.
>> I agree making it that big is not necessary for most purposes, but
>> we're trying to tear apart the "do I have ipv6 or not" issue (which is
>> really a kernel thing, and can differ per system) from the
>> availability of some structs on the build system. At some point, we
>> might be able to build binaries that work and support "whatever's
>> best" on both win2k (ipv4-only) and winxp (ipv6-also), all in the same
>> binary.
>> I think the patch is a good idea (will review in a bit).
> Here's an updated version, taking M?ns' comments into account.

Excellent work, both applied, thanks! So I guess that only leaves
udp.c to be fixed now?

Thanks for all your work on this, it's been on my todo list for ages
and I unfortunately never got around to doing it.


More information about the ffmpeg-devel mailing list