Commit ab0ac755 authored by Philipp Schafft's avatar Philipp Schafft 🦁

fixing some compiler warnings

svn path=/icecast/trunk/net/; revision=19282
parent 9353b5e4
...@@ -159,7 +159,8 @@ char *resolver_getname(const char *ip, char *buff, int len) ...@@ -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';
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