varnish / varnish-modules

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

VRT interface change; build error in vmod_saintmode against varnish-6.1.1: director has no member named 'healthy' #127

Closed ingvarha closed 6 years ago

ingvarha commented 6 years ago

The VRT interface changed in vrt 8.0. From varnish-6.1.1/include/vrt.h:

Ingvar

VMODTOOL vcc_saintmode_if.c CC vmod_saintmode.lo vmod_saintmode.c: In function ‘healthy’: vmod_saintmode.c:272:17: error: ‘const struct director’ has no member named ‘healthy’ return (sm->be->healthy(sm->be, bo, changed)); ^~ vmod_saintmode.c:285:25: error: ‘const struct director’ has no member named ‘healthy’ return (retval ? sm->be->healthy(sm->be, bo, changed) : 0); ^~ vmod_saintmode.c: In function ‘vmod_saintmode__init’: vmod_saintmode.c:346:10: error: ‘struct director’ has no member named ‘resolve’ sm->sdir->resolve = resolve; ^~ vmod_saintmode.c:347:10: error: ‘struct director’ has no member named ‘healthy’ sm->sdir->healthy = healthy; ^~ vmod_saintmode.c:352:10: error: ‘struct director’ has no member named ‘name’ sm->sdir->name = "saintmode"; ^~ vmod_saintmode.c: In function ‘healthy’: vmod_saintmode.c:286:1: error: control reaches end of non-void function [-Werror=return-type] } ^ cc1: all warnings being treated as errors make[2]: [Makefile:915: vmod_saintmode.lo] Error 1 make[2]: Leaving directory '/home/ingvar/git/varnish_software/varnish-modules/src' make[1]: [Makefile:536: all-recursive] Error 1 make[1]: Leaving directory '/home/ingvar/git/varnish_software/varnish-modules' make: *** [Makefile:447: all] Error 2

dridi commented 6 years ago

Duplicate of other tickets, please subscribe to https://github.com/varnish/varnish-modules/pull/119#issuecomment-436693353 instead.