diff --git a/src/rtp/net_udp.c b/src/rtp/net_udp.c index 08702c92a..430cf687b 100644 --- a/src/rtp/net_udp.c +++ b/src/rtp/net_udp.c @@ -50,6 +50,7 @@ #include #include +#include // for uint16_t, uintmax_t #ifndef _WIN32 #include @@ -932,7 +933,7 @@ get_ifindex(const char *iface) // check if the value isn't the index itself char *endptr = NULL; const long val = strtol(iface, &endptr, 0); - if (*endptr == '\0' && val >= 0 && (unsigned) val <= UINT_MAX) { + if (*endptr == '\0' && val >= 0 && (uintmax_t) val <= UINT_MAX) { char buf[IF_NAMESIZE]; if (if_indextoname(val, buf) != NULL) { MSG(INFO, "Using mcast interface %s\n", buf);