changeset 3723:81726233f9b3 libavformat

use h_addr_list[0] instead of h_addr as this is the posix hostent field name
author aurel
date Thu, 14 Aug 2008 22:36:05 +0000
parents 68749aaea50f
children 178cc6f9d5ec
files os_support.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/os_support.c	Thu Aug 14 22:01:59 2008 +0000
+++ b/os_support.c	Thu Aug 14 22:36:05 2008 +0000
@@ -68,7 +68,7 @@
         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;
 }