From a964e813a1d5fc7942b43ae75a44677cb3815b0e Mon Sep 17 00:00:00 2001 From: Aurelien Jacobs Date: Thu, 14 Aug 2008 22:36:05 +0000 Subject: [PATCH] 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 --- libavformat/os_support.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/os_support.c b/libavformat/os_support.c index 3357595590..434d4b8693 100644 --- a/libavformat/os_support.c +++ b/libavformat/os_support.c @@ -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; }