1
0
mirror of https://gitlab.xiph.org/xiph/icecast-common.git synced 2024-12-04 14:46:31 -05:00

fixing some compiler warnings

svn path=/icecast/trunk/net/; revision=19282
This commit is contained in:
Philipp Schafft 2014-11-07 23:14:29 +00:00
parent b5fca17bfb
commit f476beb632

View File

@ -159,7 +159,8 @@ char *resolver_getname(const char *ip, char *buff, int len)
thread_mutex_lock(&_resolver_mutex); thread_mutex_lock(&_resolver_mutex);
if (inet_aton (ip, &addr)) { if (inet_aton (ip, &addr)) {
if ((host=gethostbyaddr (&addr, sizeof (struct in_addr), AF_INET))) /* casting &addr to const char* as it is recommended on win* */
if ((host=gethostbyaddr ((const char *)&addr, sizeof (struct in_addr), AF_INET)))
{ {
ret = strncpy (buff, host->h_name, len); ret = strncpy (buff, host->h_name, len);
buff [len-1] = '\0'; buff [len-1] = '\0';