[Ffmpeg-devel] [PATCH] inet_aton

François Revol revol
Thu Jan 25 09:43:31 CET 2007


> Hello,
> 
> The current inet_aton implementation in os_support.c returns valid 
> even if
> a string (the hostname) has been passed.

Ours could just return 0 instead of goto done on errors, that'd fix it 
I guess.

> 
> Fran?ois, does it work for you when passing a hostname instead of an 
> IP
> address to FFmpeg?

Well, it tries to send to 0.0.0.0 with a hostname.
oddly libavformat exports inet_aton while importing inet_ntoa...
Probably because check_func in configure doesn't include the correct 
header and thus can't find the mangled symbol.
It's not a problem though, as some version of BONE has a broken 
inet_aton anyway IIRC.

> 
> Does BeOS have the inet_addr function? If so we could use Michael 
> Kohn's
> implementation of inet_aton as a wrapper around inet_addr.

BeOS R5 (net_server) doesn't have either.
BeOS BONE has both as it uses the resolver from Bind 8 as a library.
But they are exported as 
000322f0 T __inet_addr
0003232c T __inet_aton
and #defined in the header.

> 
> Attached patch takes inet_aton from uClibc (which is also LGPL).

Looks ok, I'm not the one decicing.


Fran?ois.




More information about the ffmpeg-devel mailing list