diff --git a/examples/unix/c11/z_sub_attachment.c b/examples/unix/c11/z_sub_attachment.c index 146cf5bb7..f7241eb73 100644 --- a/examples/unix/c11/z_sub_attachment.c +++ b/examples/unix/c11/z_sub_attachment.c @@ -13,6 +13,7 @@ // #include +#include #include #include #include @@ -83,7 +84,7 @@ void data_handler(const z_loaned_sample_t *sample, void *ctx) { // Check timestamp const z_timestamp_t *ts = z_sample_timestamp(sample); if (ts != NULL) { - printf(" with timestamp: %ld\n", z_timestamp_npt64_time(ts)); + printf(" with timestamp: %" PRIu64 "\n", z_timestamp_npt64_time(ts)); } // Check attachment kv_pairs_t kvp = {.current_idx = 0, .len = KVP_LEN, .data = (kv_pair_t *)malloc(KVP_LEN * sizeof(kv_pair_t))};