From 239f6524d5e7060dd158b068b6ab6f0235c67e52 Mon Sep 17 00:00:00 2001 From: Alexander Bushnev Date: Mon, 9 Dec 2024 14:48:11 +0100 Subject: [PATCH] Compilation fix --- src/protocol/codec/serial.c | 3 ++- src/system/common/serial.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) 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