[PATCH] debuginfod/debuginfod-client.c: correct string format on 32bit arches with 64bit time_t

Frank Ch. Eigler fche@redhat.com
Thu Nov 25 17:51:07 GMT 2021

Hi -

> Use intmax_t to print time_t
> [...]
> -      if (dprintf(fd, "%ld", cache_config_default_s) < 0)
> +      if (dprintf(fd, "%jd", (intmax_t)cache_config_default_s) < 0)
> [...]

I'm not a compatibility specialist, but note that elfutils is sometimes
built on decade-old toolchains, where use of %lld and (long long) would
certainly work.  We have such in the code base already, whereas this would
be the first %j.

- FChE

More information about the Elfutils-devel mailing list