diff --git a/libs/libc/stdio/lib_libvsprintf.c b/libs/libc/stdio/lib_libvsprintf.c index e1101d8ef9..7a0f01850e 100644 --- a/libs/libc/stdio/lib_libvsprintf.c +++ b/libs/libc/stdio/lib_libvsprintf.c @@ -410,6 +410,18 @@ static int vsprintf_internal(FAR struct lib_outstream_s *stream, } } + if (c == 'j') + { + /* Same as long long if available. Otherwise, long. */ + +#ifdef CONFIG_LIBC_LONG_LONG + flags |= FL_REPD_TYPE; +#endif + flags |= FL_LONG; + flags &= ~FL_SHORT; + continue; + } + if (c == 'l') { if ((flags & FL_LONG) != 0)