]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: applet: fix build on some 32-bit archs
authorWilly Tarreau <w@1wt.eu>
Wed, 21 Feb 2024 03:16:16 +0000 (04:16 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 21 Feb 2024 03:18:32 +0000 (04:18 +0100)
The to_forward field was added to debugging output of applets with commit
62a81cb6a ("MINOR: applet: Add callback function to deal with zero-copy
forwarding"), though it's a size_t printed as %lu, which causes complaints
on 32-bit archs. Let's just cast as %lu.

No backport is needed.

src/applet.c

index 303d9f70809f96cff002775113167859d3d7c42e..615cf3ef09cd3e95780640598682099723a002da 100644 (file)
@@ -142,7 +142,7 @@ static void applet_trace(enum trace_level level, uint64_t mask, const struct tra
 
        chunk_appendf(&trace_buf, " appctx=%p .t=%p .t.exp=%d .flags=0x%x .st0=%d .st1=%d to_fwd=%lu",
                      appctx, appctx->t, tick_isset(appctx->t->expire) ? TICKS_TO_MS(appctx->t->expire - now_ms) : TICK_ETERNITY,
-                     appctx->flags, appctx->st0, appctx->st1, appctx->to_forward);
+                     appctx->flags, appctx->st0, appctx->st1, (ulong)appctx->to_forward);
 
        if (!sc || src->verbosity == STRM_VERB_MINIMAL)
                return;