Re: [oe] [meta-oe][wrynose][PATCH] ltrace: fix PRIb64 length modifier on LP64 musl

Anuj Mittal <[email protected]> Tue, 21 Jul 2026 07:46:41 +0800
Newsgroups org.openembedded.lists.openembedded-devel
Message-ID <CA+s=J=xytfH89NZRWo4tooHb5S4EAWbxwzP87Y2-r5qgee__8A@mail.gmail.com>
Hi,

On Tue, Jul 21, 2026 at 6:52 AM Alejandro Mery via
lists.openembedded.org <[email protected]> wrote:
>
> lens_default.c defines PRIb64 through a fallback that hardcodes
> __PRI64_PREFIX as "ll". That is only correct where uint64_t is unsigned
> long long (ILP32). On LP64 musl targets uint64_t is unsigned long, so the
> resulting "%llb" conversion does not match the argument and do_compile
> aborts under -Werror=format:
>
>     lens_default.c:90:48: error: format '%llb' expects argument of type
>     'long long unsigned int', but argument 3 has type 'uint64_t'
>     {aka 'long unsigned int'}
>
> glibc never reaches the fallback: it defines __PRI64_PREFIX itself,
> wordsize aware, in <inttypes.h>. musl provides the same modifier there
> under the name __PRI64 but not __PRI64_PREFIX, so the hardcoded "ll" is
> used and is wrong on 64-bit. Reuse musl's __PRI64 when __PRI64_PREFIX is
> absent, keeping "ll" as a last resort. glibc builds are unaffected: the
> block is skipped entirely.
>
> Signed-off-by: Alejandro Mery <[email protected]>
> ---
>  ...t-fix-PRIb64-length-modifier-on-musl.patch | 49 +++++++++++++++++++
>  .../recipes-devtools/ltrace/ltrace_0.8.1.bb   |  1 +

master has the same version so I'm guessing this fix is applicable
there as well. Please send it for master branch first and wrynose fix
can be cherry picked from there.

Thanks,

Anuj