Skip to content

Conversation

rst0git
Copy link
Member

@rst0git rst0git commented Sep 24, 2025

On ARMv7 unsigned long is 32-bit while u64 is 64-bit. This caused multiple build failures:

  • page-xfer.c: passing u64 * to page_pipe_read(), which expects unsigned long *.
  • pagemap.c: using %lx to print a u64 field, which triggers -Wformat errors under -Werror.

This patch resolves the build failures on armv7 while preserving correct semantics for 64-bit builds.

Fixes: #2756

@rst0git rst0git requested a review from avagin September 24, 2025 21:51
@rst0git rst0git marked this pull request as ready for review September 24, 2025 22:04
@rst0git rst0git force-pushed the page-xfer-nr-pages branch from 8d54e0f to 33afd66 Compare October 1, 2025 15:51
@rst0git rst0git changed the title page-xfer: use unsigned long for nr_pages page-xfer: use fixed-size 64-bit type for nr_pages Oct 1, 2025
The size of `unsigned long` is not guaranteed across platforms which
leads to build errors on armv7. Using `uint64_t` allows us to address
this issue as it is always 64-bit.

Fixes: checkpoint-restore#2756

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
@rst0git rst0git force-pushed the page-xfer-nr-pages branch from 33afd66 to 32c5bd1 Compare October 1, 2025 15:54
@rst0git rst0git requested a review from avagin October 1, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

armv7 cross compilation fails with uint64 nr_pages
2 participants