varnish / varnish-modules

Collection of Varnish Cache modules (vmods) by Varnish Software
Other
184 stars 86 forks source link

vmod_tcp: format error in log when built on 32bit, as VCL_INT does not match %lu #118

Closed ingvarha closed 6 years ago

ingvarha commented 6 years ago

When building varnish-modules-0.15 for el6/i686, VCL_INT is not "long unsigned int", so using %lu for formatting does not work, and gcc goes

vmod_tcp.c:177: error: format '%lu' expects type 'long unsigned int', but argument 4 has type 'VCL_INT'

Line 177 looks like this:

VSLb(ctx->vsl, SLT_VCL_Log, "vmod-tcp: Socket paced to %lu KB/s.", rate);

Ingvar

dridi commented 6 years ago

Duplicate of #117.