Skip to content

Commit

Permalink
Merge pull request #20693 from benpicco/sys/ztimer64-print_fix
Browse files Browse the repository at this point in the history
sys/ztimer64: fix build when PRIu64 is not defined
  • Loading branch information
maribu authored May 24, 2024
2 parents 4131abd + a209ef1 commit 9122370
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sys/ztimer64/ztimer64.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,13 @@ void ztimer64_clock_print(const ztimer64_clock_t *clock)
const ztimer64_base_t *entry = clock->first;

while (entry) {
#ifdef PRIu64
printf("0x%08" PRIxPTR ":%" PRIu64 "\n", (uintptr_t)entry, entry->target);
#else
printf("0x%08" PRIxPTR ":%" PRIu32 "%s\n",
(uintptr_t)entry, (uint32_t)entry->target,
entry->target > UINT32_MAX ? " !TRUNC!" : "");
#endif
entry = entry->next;
}
puts("");
Expand Down

0 comments on commit 9122370

Please sign in to comment.