// Convert `node` into types
if( service )
{
- char *end;
+ const char *end;
- default_port = strtol(service, &end, 0);
+ default_port = strtol(service, (char**)&end, 0);
if( *end != '\0' && (hints->ai_flags & AI_NUMERICSERV) )
{
return EAI_NONAME;
#include <netinet/in.h>
#include <net.h> // Net_PrintAddress
#include <acess/sys.h> // _SysDebug
+#include <string.h>
// === CODE ===
int inet_pton(int af, const char *src, void *dst)
switch(af)
{
case AF_INET:
- str = Net_PrintAddress(4, ((struct in_addr*)src)->s_addr);
+ str = Net_PrintAddress(4, &((const struct in_addr*)src)->s_addr);
break;
case AF_INET6:
- str = Net_PrintAddress(6, ((struct in6_addr*)src)->s6_addr);
+ str = Net_PrintAddress(6, &((const struct in6_addr*)src)->s6_addr);
break;
default:
str = NULL;