[OpenWrt-Devel] [PATCH] umdns: fix 64-bit time format string

Hans Dedecker dedeckeh at gmail.com
Sat Mar 28 04:26:13 EDT 2020


On Fri, Mar 27, 2020 at 12:00 AM Rosen Penev <rosenp at gmail.com> wrote:
>
> Fixes compilation under musl 1.2.0
>
> Signed-off-by: Rosen Penev <rosenp at gmail.com>
> ---
>  service.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/service.c b/service.c
> index 97b6f91..2a7c28f 100644
> --- a/service.c
> +++ b/service.c
> @@ -122,7 +122,7 @@ service_timeout(struct service *s)
>         time_t t = monotonic_time();
>
>         if (t - s->t <= TOUT_LOOKUP) {
> -               DBG(2, "t=%lu, s->t=%lu, t - s->t = %lu\n", t, s->t, t - s->t);
> +               DBG(2, "t=" PRId64 ", s->t=" PRId64 ", t - s->t = " PRId64  "\n", (int64_t)t, (int64_t)s->t, (int64_t)(t - s->t));
This will fail to compile just like the odhcpd patch as it should be %"PRId64"

Hans
>                 return 0;
>         }
>
> --
> 2.25.1
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list