diff --git a/src/read_tcpip.cc b/src/read_tcpip.cc index 5f588825..08c7b0b6 100644 --- a/src/read_tcpip.cc +++ b/src/read_tcpip.cc @@ -37,6 +37,7 @@ #include #include #include +#include struct read_tcpip_data { char *host; @@ -75,7 +76,7 @@ void parse_tcp_ping_arg(struct text_object *obj, const char *arg, void *free_at_ obj->data.opaque = addr; memset(addr, 0, sizeof(struct sockaddr_in)); hostname = (char *) malloc(strlen(arg)+1); - switch( sscanf(arg, "%s %u", hostname, (unsigned int*) &(addr->sin_port)) ) { + switch( sscanf(arg, "%s %"SCNu16, hostname, &(addr->sin_port)) ) { case 1: addr->sin_port = DEFAULT_TCP_PING_PORT; break;