diff mbox series

[2/4] v4l-utils: use 64-bit off_t format

Message ID 20240630224440.5912-2-rosenp@gmail.com
State Superseded
Headers show
Series [1/4] v4l-utils: fix potential crashing with 32-bit musl | expand

Commit Message

Rosen Penev June 30, 2024, 10:44 p.m. UTC
musl uses 64-bit off_t by default on all platforms. Cast and fix format
to work everywhere.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 utils/v4l2-tracer/retrace.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/utils/v4l2-tracer/retrace.cpp b/utils/v4l2-tracer/retrace.cpp
index 60d64d8b..010936c0 100644
--- a/utils/v4l2-tracer/retrace.cpp
+++ b/utils/v4l2-tracer/retrace.cpp
@@ -72,7 +72,7 @@  void retrace_mmap(json_object *mmap_obj, bool is_mmap64)
 	                           (long) buf_address_retrace_pointer);
 
 	if (is_verbose() || (errno != 0)) {
-		fprintf(stderr, "fd: %d, offset: %ld, ", fd_retrace, off);
+		fprintf(stderr, "fd: %d, offset: %lld, ", fd_retrace, (long long)off);
 		if (is_mmap64)
 			perror("mmap64");
 		else