net/can: Fix CONFIG errors in can_recvmsg

This commit is contained in:
JacobCrabill 2022-04-15 14:53:29 -07:00 committed by Mateusz Szafoni
parent 4610aee973
commit 0a6181f4d7

View File

@ -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 >