Compatibility with current varnish-cache

vrt_null_blob was moved into varnishd and thus is only available
when a vmod is dlopen'ed from varnishd.

Provide an own implementation and make sure it is exported.
parent 177749c5
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
vmod-tus vmod-tus
======== ========
This version is for Varnish-Cache 6.5.0 and later This version is for Varnish-Cache 7 and later
DESCRIPTION DESCRIPTION
=========== ===========
......
...@@ -8,6 +8,7 @@ bin_PROGRAMS = vmod_get_h ...@@ -8,6 +8,7 @@ bin_PROGRAMS = vmod_get_h
vmod_get_h_SOURCES = \ vmod_get_h_SOURCES = \
vmod_get_h.c vmod_get_h.c
vmod_get_h_LDFLAGS = -rdynamic
vmod_get_h_LDADD = -ldl vmod_get_h_LDADD = -ldl
TESTS = \ TESTS = \
......
...@@ -36,6 +36,12 @@ ...@@ -36,6 +36,12 @@
#include "vdef.h" #include "vdef.h"
#include "vrt.h" #include "vrt.h"
const struct vrt_blob *vrt_null_blob = &(struct vrt_blob){
.type = VRT_NULL_BLOB_TYPE,
.len = 0,
.blob = "\0"
};
int int
main(int argc, char **argv) { main(int argc, char **argv) {
void *dlhdl; void *dlhdl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment