(svn r24571) -Fix: do not cast away const

This commit is contained in:
rubidium 2012-10-04 15:25:57 +00:00
parent 95866a7a75
commit a92f7ec90e

View File

@ -57,7 +57,7 @@ static inline int OTTDgetnameinfo(const struct sockaddr *sa, socklen_t salen, ch
if (getnameinfo != NULL) return getnameinfo(sa, salen, host, hostlen, serv, servlen, flags); if (getnameinfo != NULL) return getnameinfo(sa, salen, host, hostlen, serv, servlen, flags);
strncpy(host, inet_ntoa(((struct sockaddr_in *)sa)->sin_addr), hostlen); strncpy(host, inet_ntoa(((const struct sockaddr_in *)sa)->sin_addr), hostlen);
return 0; return 0;
} }
#define getnameinfo OTTDgetnameinfo #define getnameinfo OTTDgetnameinfo