Mercurial > libavformat.hg
changeset 5505:166bc62c1d57 libavformat
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.
Patch by Martin Storsj <$firstname()$firstname,st>.
author | rbultje |
---|---|
date | Fri, 08 Jan 2010 00:04:23 +0000 |
parents | e15a959963f1 |
children | 1838c590a0b9 |
files | os_support.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/os_support.c Thu Jan 07 23:05:19 2010 +0000 +++ b/os_support.c Fri Jan 08 00:04:23 2010 +0000 @@ -54,7 +54,7 @@ if (!add1 || (add1|add2|add3|add4) > 255) return 0; - add->s_addr=(add4<<24)+(add3<<16)+(add2<<8)+add1; + add->s_addr = htonl((add1 << 24) + (add2 << 16) + (add3 << 8) + add4); return 1; }