[FFmpeg-devel] [PATCH] Make the inet_aton replacement endian independent
Fri Jan 8 03:30:46 CET 2010
On Thu, Jan 07, 2010 at 06:21:42PM +0200, Martin Storsj? wrote:
> On Thu, 7 Jan 2010, Ronald S. Bultje wrote:
> > On Fri, Jan 1, 2010 at 11:04 AM, Martin Storsj? <martin at martin.st> wrote:
> > > Currently, the replacement which is used if inet_aton isn't available,
> > > only works correctly on little-endian. The attached patch makes it endian
> > > independent.
> > - add->s_addr=(add4<<24)+(add3<<16)+(add2<<8)+add1;
> > + add->s_addr = htonl((add1<<24) + (add2<<16) + (add3<<8) + add4);
> > I'd add spaces: add3_<<_8 (around all) while you're at it. Otherwise
> > patch OK, if tested.
> Yes, tested on both big- and little-endian.
> > Do you have a SVN account or do I need to apply for you?
> I don't have any SVN account, so feel free to apply with any formatting
> changes you like.
If ronald thinks you should have a svn account then i dont mind if you
get one (assuming you agree to our development policy)
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel