From 0a6181f4d77edcb6fa05672c787decf5080d6550 Mon Sep 17 00:00:00 2001 From: JacobCrabill Date: Fri, 15 Apr 2022 14:53:29 -0700 Subject: [PATCH] net/can: Fix CONFIG errors in can_recvmsg --- net/can/can_recvmsg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/can/can_recvmsg.c b/net/can/can_recvmsg.c index 540e2d696c..536e72a1ed 100644 --- a/net/can/can_recvmsg.c +++ b/net/can/can_recvmsg.c @@ -410,8 +410,7 @@ static uint16_t can_recvfrom_eventhandler(FAR struct net_driver_s *dev, FAR void *pvpriv, uint16_t flags) { struct can_recvfrom_s *pstate = (struct can_recvfrom_s *)pvpriv; -#if (defined(CONFIG_NET_CANPROTO_OPTIONS) && defined(CONFIG_NET_CAN_CANFD)) || \ - defined(CONFIG_NET_TIMESTAMP) +#if defined(CONFIG_NET_CANPROTO_OPTIONS) || defined(CONFIG_NET_TIMESTAMP) struct can_conn_s *conn = (struct can_conn_s *)pstate->pr_sock->s_conn; #endif @@ -437,7 +436,7 @@ static uint16_t can_recvfrom_eventhandler(FAR struct net_driver_s *dev, if (!conn->fd_frames) #endif { -#if defined(CONFIG_NET_TIMESTAMP) +#ifdef CONFIG_NET_TIMESTAMP if ((conn->sconn.s_timestamp && (dev->d_len > sizeof(struct can_frame) + sizeof(struct timeval))) || (!conn->sconn.s_timestamp && (dev->d_len >