diff --git a/src/protocol/codec/serial.c b/src/protocol/codec/serial.c index b5c0e0b4a..76356ecdd 100644 --- a/src/protocol/codec/serial.c +++ b/src/protocol/codec/serial.c @@ -12,6 +12,7 @@ // ZettaScale Zenoh Team, // +#include #include #include @@ -108,7 +109,7 @@ size_t _z_serial_msg_deserialize(const uint8_t *src, size_t src_len, uint8_t *ds uint32_t computed_crc = _z_crc32(dst, wire_size); if (received_crc != computed_crc) { - _Z_DEBUG("CRC mismatch. Received: 0x%08lX, Computed: 0x%08lX", received_crc, computed_crc); + _Z_DEBUG("CRC mismatch. Received: 0x%08" PRIu32 ", Computed: 0x%08" PRIu32, received_crc, computed_crc); return SIZE_MAX; } diff --git a/src/system/common/serial.c b/src/system/common/serial.c index 2104818ea..c7f0847d0 100644 --- a/src/system/common/serial.c +++ b/src/system/common/serial.c @@ -12,6 +12,8 @@ // ZettaScale Zenoh Team, // +#if Z_FEATURE_LINK_SERIAL == 1 + #include "zenoh-pico/protocol/definitions/serial.h" #include @@ -78,3 +80,4 @@ size_t _z_read_exact_serial(const _z_sys_net_socket_t sock, uint8_t *ptr, size_t return n; } +#endif // Z_FEATURE_LINK_SERIAL == 1