1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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

Originally committed as revision 14768 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Aurelien Jacobs 2008-08-14 22:36:05 +00:00
parent 47698b83fd
commit a964e813a1

View File

@ -68,7 +68,7 @@ int resolve_host(struct in_addr *sin_addr, const char *hostname)
hp = gethostbyname(hostname);
if (!hp)
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;
}