Seeing compile error on 32bit platforms. Apply patch for the printf formats to accommodate the longer numbers.
Signed-off-by: Ryan Eatmon <[email protected]> --- .../yavta/0001-yavta-Fix-32-bit-compile.patch | 55 +++++++++++++++++++ .../v4l2apps/yavta_%.bbappend | 7 +++ 2 files changed, 62 insertions(+) create mode 100644 meta-arago-extras/recipes-multimedia/v4l2apps/yavta/0001-yavta-Fix-32-bit-compile.patch create mode 100644 meta-arago-extras/recipes-multimedia/v4l2apps/yavta_%.bbappend diff --git a/meta-arago-extras/recipes-multimedia/v4l2apps/yavta/0001-yavta-Fix-32-bit-compile.patch b/meta-arago-extras/recipes-multimedia/v4l2apps/yavta/0001-yavta-Fix-32-bit-compile.patch new file mode 100644 index 00000000..bad6dcf6 --- /dev/null +++ b/meta-arago-extras/recipes-multimedia/v4l2apps/yavta/0001-yavta-Fix-32-bit-compile.patch @@ -0,0 +1,55 @@ +From a588c79237548931300d67a1f174ba01dad954fa Mon Sep 17 00:00:00 2001 +From: Ryan Eatmon <[email protected]> +Date: Fri, 13 Sep 2024 09:05:29 -0500 +Subject: [master][PATCH] yavta: Fix 32-bit compile + +The format for printing various time elements are not working for 64bit +times on a 32bit compile. + +../git/yavta.c:2195:51: error: format '%ld' expects argument of type 'long int', but argument 8 has type '__time64_t' {aka 'long long int'} [-Werror=format=] + 2195 | printf("%u (%u) [%c] %s %u %u B %ld.%06ld %ld.%06ld %.3f fps ts %s/%s\n", i, buf.index, + | ~~^ + | | + | long int + | %lld +...... + 2199 | buf.timestamp.tv_sec, buf.timestamp.tv_usec, + | ~~~~~~~~~~~~~~~~~~~~ + | | + | __time64_t {aka long long int} + +Change the formats to be lld/llu to accommodate the change for 32bit +compiles. + +Upstream-Status: Pending + +Signed-off-by: Ryan Eatmon <[email protected]> +--- + yavta.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/yavta.c b/yavta.c +index 3bf82b3..1e3b268 100644 +--- a/yavta.c ++++ b/yavta.c +@@ -2192,7 +2192,7 @@ static int video_do_capture(struct device *dev, unsigned int nframes, + + clock_gettime(CLOCK_MONOTONIC, &ts); + get_ts_flags(buf.flags, &ts_type, &ts_source); +- printf("%u (%u) [%c] %s %u %u B %ld.%06ld %ld.%06ld %.3f fps ts %s/%s\n", i, buf.index, ++ printf("%u (%u) [%c] %s %u %u B %lld.%06lld %lld.%06ld %.3f fps ts %s/%s\n", i, buf.index, + (buf.flags & V4L2_BUF_FLAG_ERROR) ? 'E' : '-', + v4l2_field_name(buf.field), + buf.sequence, video_buffer_bytes_used(dev, &buf), +@@ -2254,7 +2254,7 @@ static int video_do_capture(struct device *dev, unsigned int nframes, + bps = size/(ts.tv_nsec/1000.0+1000000.0*ts.tv_sec)*1000000.0; + fps = i/(ts.tv_nsec/1000.0+1000000.0*ts.tv_sec)*1000000.0; + +- printf("Captured %u frames in %lu.%06lu seconds (%f fps, %f B/s).\n", ++ printf("Captured %u frames in %llu.%06lu seconds (%f fps, %f B/s).\n", + i, ts.tv_sec, ts.tv_nsec/1000, fps, bps); + + done: +-- +2.17.1 + diff --git a/meta-arago-extras/recipes-multimedia/v4l2apps/yavta_%.bbappend b/meta-arago-extras/recipes-multimedia/v4l2apps/yavta_%.bbappend new file mode 100644 index 00000000..c3c22a55 --- /dev/null +++ b/meta-arago-extras/recipes-multimedia/v4l2apps/yavta_%.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI:append = " \ + file://0001-yavta-Fix-32-bit-compile.patch \ +" + +PR:append = ".arago0" -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#15557): https://lists.yoctoproject.org/g/meta-arago/message/15557 Mute This Topic: https://lists.yoctoproject.org/mt/108435333/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
