diff --git a/net/udp/udp_input.c b/net/udp/udp_input.c index 3176e7daff8..f699e74ffbe 100644 --- a/net/udp/udp_input.c +++ b/net/udp/udp_input.c @@ -99,7 +99,9 @@ static int udp_input(FAR struct net_driver_s *dev, unsigned int iplen) FAR struct udp_conn_s *conn; unsigned int udpiplen; unsigned int hdrlen; +#ifdef CONFIG_NET_UDP_CHECKSUMS uint16_t chksum; +#endif int ret = OK; /* Update the count of UDP packets received */