Skip to content

libbpf-tools: Fix 64-bit format portability - #5549

Open
berringtoni36-commits wants to merge 1 commit into
iovisor:masterfrom
berringtoni36-commits:issue-5330-portable-lost-count
Open

libbpf-tools: Fix 64-bit format portability#5549
berringtoni36-commits wants to merge 1 commit into
iovisor:masterfrom
berringtoni36-commits:issue-5330-portable-lost-count

Conversation

@berringtoni36-commits

Copy link
Copy Markdown

Description

Use the portable integer format macros from <inttypes.h> for 64-bit values in libbpf-tools, and explicitly cast lost-event counters passed to variadic logging functions. This avoids assuming that Linux __u64 is always unsigned long long, which breaks builds on ppc64le where it is unsigned long.

The change covers the libbpf-tools format sites that would otherwise trigger -Werror=format, including the failure reported in #5330.

Testing

  • git diff --check
  • make -C libbpf-tools -j2 (cannot complete on macOS because the environment lacks Linux headers such as asm/unistd.h and byteswap.h)

Fixes #5330

Signed-off-by: 赵文强 <17364305797@163.com>
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.

Build failing on ppc64el due to printf formatting error

1 participant