Commit 67da87de authored by aurel's avatar aurel

use h_addr_list[0] instead of h_addr as this is the posix hostent field name

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14768 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 89a3c60e
...@@ -68,7 +68,7 @@ int resolve_host(struct in_addr *sin_addr, const char *hostname) ...@@ -68,7 +68,7 @@ int resolve_host(struct in_addr *sin_addr, const char *hostname)
hp = gethostbyname(hostname); hp = gethostbyname(hostname);
if (!hp) if (!hp)
return -1; return -1;
memcpy(sin_addr, hp->h_addr, sizeof(struct in_addr)); memcpy(sin_addr, hp->h_addr_list[0], sizeof(struct in_addr));
} }
return 0; return 0;
} }
......
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