diff --git a/drivers/can/can.c b/drivers/can/can.c index 5f87408882..a0d6d3ad96 100644 --- a/drivers/can/can.c +++ b/drivers/can/can.c @@ -44,6 +44,7 @@ #include #include +#include #include #include #include @@ -1237,7 +1238,7 @@ int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr, int errcode = -ENOMEM; int i; - caninfo("ID: %d DLC: %d\n", hdr->ch_id, hdr->ch_dlc); + caninfo("ID: %" PRId32 " DLC: %d\n", (uint32_t)hdr->ch_id, hdr->ch_dlc); /* Check if adding this new message would over-run the drivers ability to * enqueue read data.