Commit d5ef9eec authored by rbultje's avatar rbultje

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 Storsjo <$firstname()$firstname,st>.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21080 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent c87b586b
......@@ -54,7 +54,7 @@ int inet_aton (const char * str, struct in_addr * add)
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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment