Giter Site home page Giter Site logo

aondio / libvmod-bodyaccess Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 8.0 112 KB

Branches 4.0 && 4.1 are not in maintenance. Bug:https://github.com/varnishcache/varnish-cache/issues/1927

License: Other

Shell 8.76% C 34.96% Perl 20.94% Makefile 13.51% M4 21.83%

libvmod-bodyaccess's People

Contributors

aondio avatar daghf avatar dridi avatar kristianlyng avatar mbgrydeland avatar nigoroll avatar perbu avatar rodricels avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

libvmod-bodyaccess's Issues

POST request help

I have found your quite old post here and was hoping you could elaborate.

I have a POST request that looks like this

action=ssbp_lazy&security=6cd3beb195&ssbppostid=992&ssbptitle=Setup+uTorrent+Server+Bloatware+Free&ssbpurl=http%3A%2F%2Fwww.htpcguides.com%2Fsetup-utorrent-server-bloatware-free%2F&ssbpshorturl=&ssbpsharetext

and a response that looks like this

image

Do I need to deal with the hash for both the request and the response? Here is what I have so far

import parsereq;
sub vcl_recv{
  parsereq.init();

If req.url ~ admin.ajax.php && req.method == "POST" {
    parsereq.post_body();
    return (hash); 

}
sub vcl_hash{
  hash_data(parsereq.post_header("hogehoge"));
}

What is hoge?

Relicense to BSD

LICENSE is public domain, but future versions should be our normal license.

hash_req_body in vcl_recv

Hi,

Sorry for my english :)
why can not we put hash_req_body in vcl_recv ? I try to recover the value of a post parameter to send with vmod curl:

Example:
set req.http.x.param1= bodyaccess.hash_req_body(param1);
...
curl.get("http://example.com/test");
curl.set_method("PURGE");
curl.header_add("param: " + req.http.x.param1);

is there a solution to do that ?

Thanks !

Varnish 4.1 error when using bodyaccess

Thanks for putting this vmod out. Unfortunately I've had trouble with both 4.0.3 and 4.1.

After rebuilding on a clean machine (centos 7) for varnish 4.1 I'm seeing requests stop processing and socket closed from the client.

My VCL is

vcl 4.0;
import std;
import bodyaccess;
# Requires libvmod-bodyaccess
# See http://info.varnish-software.com/blog/introducing-libvmod-bodyaccess-reqbody-access-functions
# Check this file once installed with
# sudo /usr/sbin/varnishd -C -f /etc/varnish/default.vcl

backend default {
    .host = "10.1.1.109";
    .port = "80";
}


# Hash requests based on the request body (model input)
sub vcl_hash {
  if (req.method == "POST") {
    bodyaccess.hash_req_body();
  }
    return(lookup);
}

# On cache things that look like model api calls
sub vcl_recv {
  if (req.url ~ "/([-0-9a-zA-Z]+)/models/([-0-9a-zA-Z]+)/" && req.method == "POST") {
      # Set the method as a header so we can reuse it for the fetch
      set req.http.x-meth = req.method;
      # Buffer the request body
      std.cache_req_body(10KB);
      return (hash);
  }
    return (pass);
}

sub vcl_backend_fetch {
  # Reuse our method we kept as a header in recv
  set bereq.method = bereq.http.x-meth;
  return(fetch);
}

sub vcl_backend_response {
  # Cache everything for 5 minutes
  set beresp.ttl = 5m;
}

sub vcl_deliver {
    if (obj.hits > 0) {
        set resp.http.X-Cache = "HIT";
    } else {
        set resp.http.X-Cache = "MISS";
    }
    set resp.http.x-len = req.http.x-len;
}

and varnish log is

*   << Session  >> 1
-   Begin          sess 0 HTTP/1
-   SessOpen       50.142.106.39 40331 :80 10.1.1.116 80 1453907861.096430 15
-   Link           req 2 rxreq
-   VSL            flush
-   End            synth

*   << Request  >> 2
-   Begin          req 1 rxreq
-   Timestamp      Start: 1453907861.096500 0.000000 0.000000
-   Timestamp      Req: 1453907861.096500 0.000000 0.000000
-   ReqStart       50.142.106.39 40331
-   ReqMethod      POST
-   ReqURL         /lee/models/HelloWorld/
-   ReqProtocol    HTTP/1.1
-   ReqHeader      Authorization: Basic bGVlOmU0YjFjMTAyZTI1YmYyNjk2Njk1NzRkMjE2MDlhMGZm
-   ReqHeader      Host: 54.218.46.246
-   ReqHeader      Connection: close
-   ReqHeader      User-Agent: Paw/2.2.9 (Macintosh; OS X/10.11.3) GCDHTTPRequest
-   ReqHeader      Content-Length: 21
-   ReqHeader      X-Forwarded-For: 50.142.106.39
-   VCL_call       RECV
-   ReqHeader      x-meth: POST
-   Storage        malloc Transient
-   Timestamp      ReqBody: 1453907861.096562 0.000062 0.000062
-   Debug          "VRT_CacheReqBody(10240): 21"
-   VCL_return     hash
-   VCL_call       HASH
-   VSL            flush
-   End            synth

Log abandoned
Log reacquired

and running varnishd the panic info

start
child (26396) Started
200 0

Child (26396) said Child starts
Child (26396) died signal=6
Child (26396) Panic message:
Assert error in VRT_count(), cache/cache_vcl.c line 362:
  Condition((ctx->vcl)->magic == 0x214188f2) not true.
thread = (cache-worker)
version = varnish-4.1.0 revision 3041728
ident = Linux,3.10.0-229.14.1.el7.x86_64,x86_64,-junix,-smalloc,-smalloc,-hcritbit,epoll
Backtrace:
  0x4337a6: varnishd() [0x4337a6]
  0x43f835: varnishd(VRT_count+0xb5) [0x43f835]
  0x7f19609470ac: vgc.so(VGC_function_vcl_hash+0x4c) [0x7f19609470ac]
  0x43ed2a: varnishd() [0x43ed2a]
  0x44002a: varnishd(VCL_hash_method+0x5a) [0x44002a]
  0x43742b: varnishd(CNT_Request+0x116b) [0x43742b]
  0x44e163: varnishd(HTTP1_Session+0xe3) [0x44e163]
  0x439b91: varnishd(SES_Proto_Req+0x61) [0x439b91]
  0x448ba1: varnishd() [0x448ba1]
  0x448feb: varnishd() [0x448feb]
req = 0x7f1958096020 {
  vxid = 2, step = R_STP_RECV,
  req_body = R_BODY_CACHED,
  restarts = 0, esi_level = 0,
  sp = 0x7f1957c0f420 {
    fd = 13, vxid = 1,
    client = 50.142.106.39 34660,
    step = S_STP_H1PROC,
  },
  worker = 0x7f196091fc40 {
    stack = {0x7f1960920000 -> 0x7f1960914000},
    ws = 0x7f196091fe38 {
      id = "wrk",
      {s,f,r,e} = {0x7f196091f3e0,0x7f196091f3e0,(nil),+2040},
    },
    VCL::method = inside HASH,
    VCL::return = abandon,
    VCL::methods = {RECV, HASH},
  },
  ws = 0x7f1958096200 {
    id = "req",
    {s,f,r,e} = {0x7f1958098000,+384,(nil),+57336},
  },
  http_conn = 0x7f1958096128 {
    fd = 13,
    doclose = NULL,
    ws = 0x7f1958096200,
    {rxbuf_b, rxbuf_e} = {0x7f1958098000, 0x7f19580980ec},
    {pipeline_b, pipeline_e} = {(nil), (nil)},
    content_length = 21,
    body_status = length,
    first_byte_timeout = 0.000000,
    between_bytes_timeout = 0.000000,
  },
  http[req] = 0x7f1958096298 {
    ws[req] = 0x7f1958096200,
    hdrs {
      "POST",
      "/lee/models/HelloWorld/",
      "HTTP/1.1",
      "Authorization: Basic bGVlOmU0YjFjMTAyZTI1YmYyNjk2Njk1NzRkMjE2MDlhMGZm",
      "Host: 54.218.46.246",
      "Connection: close",
      "User-Agent: Paw/2.2.9 (Macintosh; OS X/10.11.3) GCDHTTPRequest",
      "Content-Length: 21",
      "X-Forwarded-For: 50.142.106.39",
      "x-meth: POST",
    },
  },
  vcl = {
    temp = warm
    srcname = {
      "input",
      "Builtin",
    },
  },
  flags = {
  },
},


Child cleanup complete
child (26613) Started
Child (26613) said Child starts

Thanks for any help.

Something planned about response body access?

First of all, thanks for this vmod; I think that this functionality should be in varnish-cache core.

Searching more information about this Vmod I found that the initial purpose was gain access to req and beresp body, but only the request body part was finished.

https://www.varnish-cache.org/lists/pipermail/varnish-dev/2015-June/008338.html
https://www.varnish-cache.org/lists/pipermail/varnish-dev/2015-August/008472.html
https://www.varnish-cache.org/trac/wiki/VDD15Q3

This would open new possibilities, like:

  • inject, remove data, fix backend errors (like malformed URL in emergency case)
  • invalidate cache of request with errors declared in the body but 200 in the status code (like graphQL does)
  • retry with another backend if the request contains a empty body
  • etc...

It something planned about access to the response body?

VCL_Error - Setting bereq.method to empty string

Debian 8 Jessie
Varnish 5.1.1-1

After building VMOD and running make check error message for src/tests/test04.vtc test file appears in Varnish logs:

VCL_Error b Setting bereq.method to empty string

Setting req.http.x-meth in vcl_recv should be placed outside of if (req.method == "POST") condition or the value should be verified in vcl_backend_fetch before transferring to bereq.method. I chose the first approach in PR with bug fix.

#22

Cannot compile the vmod

Hi
my server is ubuntu16.06

~/Downloads/libvmod-bodyaccess$ make
make  all-recursive
make[1]: Entering directory '/home/ubuntu/Downloads/libvmod-bodyaccess'
Making all in src
make[2]: Entering directory '/home/ubuntu/Downloads/libvmod-bodyaccess/src'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/local/include/varnish -Wall -Werror   -g -O2 -MT vmod_bodyaccess.lo -MD -MP -MF .deps/vmod_bodyaccess.Tpo -c -o vmod_bodyaccess.lo vmod_bodyaccess.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/varnish -Wall -Werror -g -O2 -MT vmod_bodyaccess.lo -MD -MP -MF .deps/vmod_bodyaccess.Tpo -c vmod_bodyaccess.c  -fPIC -DPIC -o .libs/vmod_bodyaccess.o
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:35:4: error: #error "vrt.h included after cache.h - they are inclusive"
 #  error "vrt.h included after cache.h - they are inclusive"
    ^
/usr/local/include/varnish/vrt.h:39:4: error: #error "vrt.h included multiple times"
 #  error "vrt.h included multiple times"
    ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:128:8: error: redefinition of ‘struct strands’
 struct strands {
        ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:128:8: note: originally defined here
 struct strands {
        ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:155:34: error: conflicting types for ‘VCL_STRANDS’
 typedef const struct strands *   VCL_STRANDS;
                                  ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:155:34: note: previous declaration of ‘VCL_STRANDS’ was here
 typedef const struct strands *   VCL_STRANDS;
                                  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:161:8: error: redefinition of ‘struct vrt_type’
 struct vrt_type {
        ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:161:8: note: originally defined here
 struct vrt_type {
        ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:175:8: error: redefinition of ‘struct vrt_ctx’
 struct vrt_ctx {
        ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:175:8: note: originally defined here
 struct vrt_ctx {
        ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:216:8: error: redefinition of ‘struct vmod_data’
 struct vmod_data {
        ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:216:8: note: originally defined here
 struct vmod_data {
        ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:234:6: error: nested redefinition of ‘enum vcl_event_e’
 enum vcl_event_e {
      ^
/usr/local/include/varnish/vrt.h:234:6: error: redeclaration of ‘enum vcl_event_e’
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:234:6: note: originally defined here
 enum vcl_event_e {
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:235:2: error: redeclaration of enumerator ‘VCL_EVENT_LOAD’
  VCL_EVENT_LOAD,
  ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:235:2: note: previous definition of ‘VCL_EVENT_LOAD’ was here
  VCL_EVENT_LOAD,
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:236:2: error: redeclaration of enumerator ‘VCL_EVENT_WARM’
  VCL_EVENT_WARM,
  ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:236:2: note: previous definition of ‘VCL_EVENT_WARM’ was here
  VCL_EVENT_WARM,
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:237:2: error: redeclaration of enumerator ‘VCL_EVENT_COLD’
  VCL_EVENT_COLD,
  ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:237:2: note: previous definition of ‘VCL_EVENT_COLD’ was here
  VCL_EVENT_COLD,
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:238:2: error: redeclaration of enumerator ‘VCL_EVENT_DISCARD’
  VCL_EVENT_DISCARD,
  ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:238:2: note: previous definition of ‘VCL_EVENT_DISCARD’ was here
  VCL_EVENT_DISCARD,
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:284:8: error: redefinition of ‘struct vrt_backend’
 struct vrt_backend {
        ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:284:8: note: originally defined here
 struct vrt_backend {
        ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:311:8: error: redefinition of ‘struct vrt_backend_probe’
 struct vrt_backend_probe {
        ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:152:22: note: originally defined here
 typedef const struct vrt_backend_probe * VCL_PROBE;
                      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:323:8: error: redefinition of ‘struct vrt_ref’
 struct vrt_ref {
        ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:323:8: note: originally defined here
 struct vrt_ref {
        ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:331:6: error: conflicting types for ‘VRT_count’
 void VRT_count(VRT_CTX, unsigned);
      ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:331:6: note: previous declaration of ‘VRT_count’ was here
 void VRT_count(VRT_CTX, unsigned);
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:337:13: error: conflicting types for ‘acl_match_f’
 typedef int acl_match_f(VRT_CTX, const VCL_IP);
             ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:337:13: note: previous declaration of ‘acl_match_f’ was here
 typedef int acl_match_f(VRT_CTX, const VCL_IP);
             ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:339:8: error: redefinition of ‘struct vrt_acl’
 struct vrt_acl {
        ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:120:8: note: originally defined here
 struct vrt_acl;
        ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:345:6: error: conflicting types for ‘VRT_acl_log’
 void VRT_acl_log(VRT_CTX, const char *);
      ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:345:6: note: previous declaration of ‘VRT_acl_log’ was here
 void VRT_acl_log(VRT_CTX, const char *);
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:346:5: error: conflicting types for ‘VRT_acl_match’
 int VRT_acl_match(VRT_CTX, VCL_ACL, VCL_IP);
     ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:346:5: note: previous declaration of ‘VRT_acl_match’ was here
 int VRT_acl_match(VRT_CTX, VCL_ACL, VCL_IP);
     ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:354:5: error: conflicting types for ‘VRT_re_match’
 int VRT_re_match(VRT_CTX, const char *, void *);
     ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:354:5: note: previous declaration of ‘VRT_re_match’ was here
 int VRT_re_match(VRT_CTX, const char *, void *);
     ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:360:6: error: nested redefinition of ‘enum gethdr_e’
 enum gethdr_e {
      ^
/usr/local/include/varnish/vrt.h:360:6: error: redeclaration of ‘enum gethdr_e’
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:360:6: note: originally defined here
 enum gethdr_e {
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:361:2: error: redeclaration of enumerator ‘HDR_REQ’
  HDR_REQ,
  ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:361:2: note: previous definition of ‘HDR_REQ’ was here
  HDR_REQ,
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:362:2: error: redeclaration of enumerator ‘HDR_REQ_TOP’
  HDR_REQ_TOP,
  ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:362:2: note: previous definition of ‘HDR_REQ_TOP’ was here
  HDR_REQ_TOP,
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:363:2: error: redeclaration of enumerator ‘HDR_RESP’
  HDR_RESP,
  ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:363:2: note: previous definition of ‘HDR_RESP’ was here
  HDR_RESP,
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:364:2: error: redeclaration of enumerator ‘HDR_OBJ’
  HDR_OBJ,
  ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:364:2: note: previous definition of ‘HDR_OBJ’ was here
  HDR_OBJ,
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:365:2: error: redeclaration of enumerator ‘HDR_BEREQ’
  HDR_BEREQ,
  ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:365:2: note: previous definition of ‘HDR_BEREQ’ was here
  HDR_BEREQ,
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:366:2: error: redeclaration of enumerator ‘HDR_BERESP’
  HDR_BERESP
  ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:366:2: note: previous definition of ‘HDR_BERESP’ was here
  HDR_BERESP
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:369:8: error: redefinition of ‘struct gethdr_s’
 struct gethdr_s {
        ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:147:22: note: originally defined here
 typedef const struct gethdr_s *   VCL_HEADER;
                      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:374:10: error: conflicting types for ‘VRT_selecthttp’
 VCL_HTTP VRT_selecthttp(VRT_CTX, enum gethdr_e);
          ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:374:10: note: previous declaration of ‘VRT_selecthttp’ was here
 VCL_HTTP VRT_selecthttp(VRT_CTX, enum gethdr_e);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:375:12: error: conflicting types for ‘VRT_GetHdr’
 VCL_STRING VRT_GetHdr(VRT_CTX, const struct gethdr_s *);
            ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:375:12: note: previous declaration of ‘VRT_GetHdr’ was here
 VCL_STRING VRT_GetHdr(VRT_CTX, const struct gethdr_s *);
            ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:381:11: error: conflicting types for ‘VRT_CacheReqBody’
 VCL_BYTES VRT_CacheReqBody(VRT_CTX, VCL_BYTES maxsize);
           ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:381:11: note: previous declaration of ‘VRT_CacheReqBody’ was here
 VCL_BYTES VRT_CacheReqBody(VRT_CTX, VCL_BYTES maxsize);
           ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:385:13: error: conflicting types for ‘VRT_regsub’
 const char *VRT_regsub(VRT_CTX, int all, const char *, void *, const char *);
             ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:385:13: note: previous declaration of ‘VRT_regsub’ was here
 const char *VRT_regsub(VRT_CTX, int all, const char *, void *, const char *);
             ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:386:10: error: conflicting types for ‘VRT_ban_string’
 VCL_VOID VRT_ban_string(VRT_CTX, VCL_STRING);
          ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:386:10: note: previous declaration of ‘VRT_ban_string’ was here
 VCL_VOID VRT_ban_string(VRT_CTX, VCL_STRING);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:387:9: error: conflicting types for ‘VRT_purge’
 VCL_INT VRT_purge(VRT_CTX, VCL_DURATION, VCL_DURATION, VCL_DURATION);
         ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:387:9: note: previous declaration of ‘VRT_purge’ was here
 VCL_INT VRT_purge(VRT_CTX, VCL_DURATION, VCL_DURATION, VCL_DURATION);
         ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:388:10: error: conflicting types for ‘VRT_synth’
 VCL_VOID VRT_synth(VRT_CTX, VCL_INT, VCL_STRING);
          ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:388:10: note: previous declaration of ‘VRT_synth’ was here
 VCL_VOID VRT_synth(VRT_CTX, VCL_INT, VCL_STRING);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:389:10: error: conflicting types for ‘VRT_hit_for_pass’
 VCL_VOID VRT_hit_for_pass(VRT_CTX, VCL_DURATION);
          ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:389:10: note: previous declaration of ‘VRT_hit_for_pass’ was here
 VCL_VOID VRT_hit_for_pass(VRT_CTX, VCL_DURATION);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:391:10: error: conflicting types for ‘VRT_SetHdr’
 VCL_VOID VRT_SetHdr(VRT_CTX, const struct gethdr_s *, const char *, ...);
          ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:391:10: note: previous declaration of ‘VRT_SetHdr’ was here
 VCL_VOID VRT_SetHdr(VRT_CTX, const struct gethdr_s *, const char *, ...);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:392:10: error: conflicting types for ‘VRT_handling’
 VCL_VOID VRT_handling(VRT_CTX, unsigned hand);
          ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:392:10: note: previous declaration of ‘VRT_handling’ was here
 VCL_VOID VRT_handling(VRT_CTX, unsigned hand);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:393:10: error: conflicting types for ‘VRT_fail’
 VCL_VOID VRT_fail(VRT_CTX, const char *fmt, ...) v_printflike_(2,3);
          ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:393:10: note: previous declaration of ‘VRT_fail’ was here
 VCL_VOID VRT_fail(VRT_CTX, const char *fmt, ...) v_printflike_(2,3);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:394:10: error: conflicting types for ‘VRT_hashdata’
 VCL_VOID VRT_hashdata(VRT_CTX, const char *str, ...);
          ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:394:10: note: previous declaration of ‘VRT_hashdata’ was here
 VCL_VOID VRT_hashdata(VRT_CTX, const char *str, ...);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:400:10: error: conflicting types for ‘VRT_blob’
 VCL_BLOB VRT_blob(VRT_CTX, const char *, const void *, size_t);
          ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:400:10: note: previous declaration of ‘VRT_blob’ was here
 VCL_BLOB VRT_blob(VRT_CTX, const char *, const void *, size_t);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:402:10: error: conflicting types for ‘VRT_Rollback’
 VCL_VOID VRT_Rollback(VRT_CTX, VCL_HTTP);
          ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:402:10: note: previous declaration of ‘VRT_Rollback’ was here
 VCL_VOID VRT_Rollback(VRT_CTX, VCL_HTTP);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:405:10: error: conflicting types for ‘VRT_synth_page’
 VCL_VOID VRT_synth_page(VRT_CTX, const char *, ...);
          ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:405:10: note: previous declaration of ‘VRT_synth_page’ was here
 VCL_VOID VRT_synth_page(VRT_CTX, const char *, ...);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:408:18: error: conflicting types for ‘VRT_new_backend’
 struct director *VRT_new_backend(VRT_CTX, const struct vrt_backend *);
                  ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:408:18: note: previous declaration of ‘VRT_new_backend’ was here
 struct director *VRT_new_backend(VRT_CTX, const struct vrt_backend *);
                  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:409:18: error: conflicting types for ‘VRT_new_backend_clustered’
 struct director *VRT_new_backend_clustered(VRT_CTX,
                  ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:409:18: note: previous declaration of ‘VRT_new_backend_clustered’ was here
 struct director *VRT_new_backend_clustered(VRT_CTX,
                  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:411:8: error: conflicting types for ‘VRT_backend_vsm_need’
 size_t VRT_backend_vsm_need(VRT_CTX);
        ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:411:8: note: previous declaration of ‘VRT_backend_vsm_need’ was here
 size_t VRT_backend_vsm_need(VRT_CTX);
        ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:412:6: error: conflicting types for ‘VRT_delete_backend’
 void VRT_delete_backend(VRT_CTX, struct director **);
      ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:412:6: note: previous declaration of ‘VRT_delete_backend’ was here
 void VRT_delete_backend(VRT_CTX, struct director **);
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:413:5: error: conflicting types for ‘VRT_backend_healthy’
 int VRT_backend_healthy(VRT_CTX, struct director *);
     ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:413:5: note: previous declaration of ‘VRT_backend_healthy’ was here
 int VRT_backend_healthy(VRT_CTX, struct director *);
     ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:416:22: error: conflicting types for ‘VRT_VSM_Cluster_New’
 struct vsmw_cluster *VRT_VSM_Cluster_New(VRT_CTX, size_t);
                      ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:416:22: note: previous declaration of ‘VRT_VSM_Cluster_New’ was here
 struct vsmw_cluster *VRT_VSM_Cluster_New(VRT_CTX, size_t);
                      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:417:6: error: conflicting types for ‘VRT_VSM_Cluster_Destroy’
 void VRT_VSM_Cluster_Destroy(VRT_CTX, struct vsmw_cluster **);
      ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:417:6: note: previous declaration of ‘VRT_VSM_Cluster_Destroy’ was here
 void VRT_VSM_Cluster_Destroy(VRT_CTX, struct vsmw_cluster **);
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:420:5: error: conflicting types for ‘VRT_Healthy’
 int VRT_Healthy(VRT_CTX, VCL_BACKEND);
     ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:420:5: note: previous declaration of ‘VRT_Healthy’ was here
 int VRT_Healthy(VRT_CTX, VCL_BACKEND);
     ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:426:5: error: conflicting types for ‘VRT_Vmod_Init’
 int VRT_Vmod_Init(VRT_CTX, struct vmod **hdl, void *ptr, int len,
     ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:426:5: note: previous declaration of ‘VRT_Vmod_Init’ was here
 int VRT_Vmod_Init(VRT_CTX, struct vmod **hdl, void *ptr, int len,
     ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:431:9: error: conflicting types for ‘VRT_vcl_get’
 VCL_VCL VRT_vcl_get(VRT_CTX, const char *);
         ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:431:9: note: previous declaration of ‘VRT_vcl_get’ was here
 VCL_VCL VRT_vcl_get(VRT_CTX, const char *);
         ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:432:6: error: conflicting types for ‘VRT_vcl_rel’
 void VRT_vcl_rel(VRT_CTX, VCL_VCL);
      ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:432:6: note: previous declaration of ‘VRT_vcl_rel’ was here
 void VRT_vcl_rel(VRT_CTX, VCL_VCL);
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:433:6: error: conflicting types for ‘VRT_vcl_select’
 void VRT_vcl_select(VRT_CTX, VCL_VCL);
      ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:433:6: note: previous declaration of ‘VRT_vcl_select’ was here
 void VRT_vcl_select(VRT_CTX, VCL_VCL);
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:435:13: error: conflicting types for ‘vmod_event_f’
 typedef int vmod_event_f(VRT_CTX, struct vmod_priv *, enum vcl_event_e);
             ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:435:13: note: previous declaration of ‘vmod_event_f’ was here
 typedef int vmod_event_f(VRT_CTX, struct vmod_priv *, enum vcl_event_e);
             ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:438:8: error: redefinition of ‘struct vmod_priv’
 struct vmod_priv {
        ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:119:8: note: originally defined here
 struct vmod_priv;
        ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:445:17: error: conflicting types for ‘VRT_ref_vcl’
 struct vclref * VRT_ref_vcl(VRT_CTX, const char *);
                 ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:445:17: note: previous declaration of ‘VRT_ref_vcl’ was here
 struct vclref * VRT_ref_vcl(VRT_CTX, const char *);
                 ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:446:6: error: conflicting types for ‘VRT_rel_vcl’
 void VRT_rel_vcl(VRT_CTX, struct vclref **);
      ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:446:6: note: previous declaration of ‘VRT_rel_vcl’ was here
 void VRT_rel_vcl(VRT_CTX, struct vclref **);
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:448:6: error: conflicting types for ‘VRT_priv_fini’
 void VRT_priv_fini(const struct vmod_priv *p);
      ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:448:6: note: previous declaration of ‘VRT_priv_fini’ was here
 void VRT_priv_fini(const struct vmod_priv *p);
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:449:19: error: conflicting types for ‘VRT_priv_task’
 struct vmod_priv *VRT_priv_task(VRT_CTX, const void *vmod_id);
                   ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:449:19: note: previous declaration of ‘VRT_priv_task’ was here
 struct vmod_priv *VRT_priv_task(VRT_CTX, const void *vmod_id);
                   ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:450:19: error: conflicting types for ‘VRT_priv_top’
 struct vmod_priv *VRT_priv_top(VRT_CTX, const void *vmod_id);
                   ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:450:19: note: previous declaration of ‘VRT_priv_top’ was here
 struct vmod_priv *VRT_priv_top(VRT_CTX, const void *vmod_id);
                   ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:458:13: error: conflicting types for ‘VRT_BundleStrands’
 VCL_STRANDS VRT_BundleStrands(int, struct strands *, char const **,
             ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:458:13: note: previous declaration of ‘VRT_BundleStrands’ was here
 VCL_STRANDS VRT_BundleStrands(int, struct strands *, char const **,
             ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:460:5: error: conflicting types for ‘VRT_CompareStrands’
 int VRT_CompareStrands(VCL_STRANDS a, VCL_STRANDS b);
     ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:460:5: note: previous declaration of ‘VRT_CompareStrands’ was here
 int VRT_CompareStrands(VCL_STRANDS a, VCL_STRANDS b);
     ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:464:12: error: conflicting types for ‘VRT_CollectString’
 VCL_STRING VRT_CollectString(VRT_CTX, const char *p, ...);
            ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:464:12: note: previous declaration of ‘VRT_CollectString’ was here
 VCL_STRING VRT_CollectString(VRT_CTX, const char *p, ...);
            ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:465:12: error: conflicting types for ‘VRT_INT_string’
 VCL_STRING VRT_INT_string(VRT_CTX, VCL_INT);
            ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:465:12: note: previous declaration of ‘VRT_INT_string’ was here
 VCL_STRING VRT_INT_string(VRT_CTX, VCL_INT);
            ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:466:12: error: conflicting types for ‘VRT_IP_string’
 VCL_STRING VRT_IP_string(VRT_CTX, VCL_IP);
            ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:466:12: note: previous declaration of ‘VRT_IP_string’ was here
 VCL_STRING VRT_IP_string(VRT_CTX, VCL_IP);
            ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:467:12: error: conflicting types for ‘VRT_REAL_string’
 VCL_STRING VRT_REAL_string(VRT_CTX, VCL_REAL);
            ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:467:12: note: previous declaration of ‘VRT_REAL_string’ was here
 VCL_STRING VRT_REAL_string(VRT_CTX, VCL_REAL);
            ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:469:12: error: conflicting types for ‘VRT_STRANDS_string’
 VCL_STRING VRT_STRANDS_string(VCL_STRANDS);
            ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:469:12: note: previous declaration of ‘VRT_STRANDS_string’ was here
 VCL_STRING VRT_STRANDS_string(VCL_STRANDS);
            ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:470:12: error: conflicting types for ‘VRT_TIME_string’
 VCL_STRING VRT_TIME_string(VRT_CTX, VCL_TIME);
            ^
In file included from /usr/local/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vrt.h:470:12: note: previous declaration of ‘VRT_TIME_string’ was here
 VCL_STRING VRT_TIME_string(VRT_CTX, VCL_TIME);
            ^
vmod_bodyaccess.c: In function ‘vmod_hash_req_body’:
vmod_bodyaccess.c:21:8: error: implicit declaration of function ‘VSB_new_auto’ [-Werror=implicit-function-declaration]
  vsb = VSB_new_auto();
        ^
vmod_bodyaccess.c:21:6: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
  vsb = VSB_new_auto();
      ^
vmod_bodyaccess.c:24:30: error: implicit declaration of function ‘VSB_data’ [-Werror=implicit-function-declaration]
  HSH_AddBytes(ctx->req, ctx, VSB_data(vsb),  VSB_len(vsb));
                              ^
vmod_bodyaccess.c:24:46: error: implicit declaration of function ‘VSB_len’ [-Werror=implicit-function-declaration]
  HSH_AddBytes(ctx->req, ctx, VSB_data(vsb),  VSB_len(vsb));
                                              ^
vmod_bodyaccess.c:24:30: error: passing argument 3 of ‘HSH_AddBytes’ makes pointer from integer without a cast [-Werror=int-conversion]
  HSH_AddBytes(ctx->req, ctx, VSB_data(vsb),  VSB_len(vsb));
                              ^
In file included from vmod_bodyaccess.c:1:0:
vmod_core.h:19:6: note: expected ‘const void *’ but argument is of type ‘int’
 void HSH_AddBytes(const struct req *req, const struct vrt_ctx *ctx,
      ^
vmod_bodyaccess.c:26:2: error: implicit declaration of function ‘VSB_delete’ [-Werror=implicit-function-declaration]
  VSB_delete(vsb);
  ^
vmod_bodyaccess.c: In function ‘vmod_rematch_req_body’:
vmod_bodyaccess.c:87:6: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
  vsb = VSB_new_auto();
      ^
vmod_bodyaccess.c:90:32: error: passing argument 2 of ‘VRE_exec’ makes pointer from integer without a cast [-Werror=int-conversion]
  i = VRE_exec(priv_call->priv, VSB_data(vsb), VSB_len(vsb), 0, 0,
                                ^
In file included from vmod_core.h:7:0,
                 from vmod_bodyaccess.c:1:
/usr/local/include/varnish/vre.h:56:5: note: expected ‘const char *’ but argument is of type ‘int’
 int VRE_exec(const vre_t *code, const char *subject, int length,
     ^
cc1: all warnings being treated as errors
Makefile:453: recipe for target 'vmod_bodyaccess.lo' failed
make[2]: *** [vmod_bodyaccess.lo] Error 1
make[2]: Leaving directory '/home/ubuntu/Downloads/libvmod-bodyaccess/src'
Makefile:516: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/ubuntu/Downloads/libvmod-bodyaccess'
Makefile:384: recipe for target 'all' failed
make: *** [all] Error 2

Try to compile to another server with varnish 6.0.1 install from package without libvmod-jq
Get another error

~/libvmod-bodyaccess$ make
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/jmango/libvmod-bodyaccess/missing aclocal-1.15 -I m4 -I /usr/share/aclocal
 cd . && /bin/bash /home/jmango/libvmod-bodyaccess/missing automake-1.15 --foreign
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/jmango/libvmod-bodyaccess/missing autoconf
/bin/bash ./config.status --recheck
running CONFIG_SHELL=/bin/bash /bin/bash ./configure PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/share/pkgconfig: --no-create --no-recursion
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for gcc option to accept ISO C99... none needed
checking for gcc option to accept ISO Standard C... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether make sets $(MAKE)... (cached) yes
checking for rst2man... no
checking for rst2man.py... no
configure: WARNING: rst2man not found - not building man pages
checking for ANSI C header files... (cached) yes
checking sys/stdlib.h usability... no
checking sys/stdlib.h presence... no
checking for sys/stdlib.h... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libvarnishapi... yes
checking vsha256.h usability... yes
checking vsha256.h presence... yes
checking for vsha256.h... yes
checking cache/cache.h usability... yes
checking cache/cache.h presence... yes
checking for cache/cache.h... yes
checking for python3... python3
checking for varnishtest... /usr/bin/varnishtest
checking for varnishd... /usr/sbin/varnishd
checking that generated files are newer than configure... done
configure: creating ./config.status
 /bin/bash ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/jmango/libvmod-bodyaccess/missing autoheader)
rm -f stamp-h1
touch config.h.in
cd . && /bin/bash ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make  all-recursive
make[1]: Entering directory '/home/jmango/libvmod-bodyaccess'
Making all in src
make[2]: Entering directory '/home/jmango/libvmod-bodyaccess/src'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/varnish -Wall -Werror   -g -O2 -MT vmod_bodyaccess.lo -MD -MP -MF .deps/vmod_bodyaccess.Tpo -c -o vmod_bodyaccess.lo vmod_bodyaccess.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -Wall -Werror -g -O2 -MT vmod_bodyaccess.lo -MD -MP -MF .deps/vmod_bodyaccess.Tpo -c vmod_bodyaccess.c  -fPIC -DPIC -o .libs/vmod_bodyaccess.o
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:35:4: error: #error "vrt.h included after cache.h - they are inclusive"
 #  error "vrt.h included after cache.h - they are inclusive"
    ^
/usr/include/varnish/vrt.h:39:4: error: #error "vrt.h included multiple times"
 #  error "vrt.h included multiple times"
    ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:128:8: error: redefinition of ‘struct strands’
 struct strands {
        ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:128:8: note: originally defined here
 struct strands {
        ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:155:34: error: conflicting types for ‘VCL_STRANDS’
 typedef const struct strands *   VCL_STRANDS;
                                  ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:155:34: note: previous declaration of ‘VCL_STRANDS’ was here
 typedef const struct strands *   VCL_STRANDS;
                                  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:161:8: error: redefinition of ‘struct vrt_type’
 struct vrt_type {
        ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:161:8: note: originally defined here
 struct vrt_type {
        ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:175:8: error: redefinition of ‘struct vrt_ctx’
 struct vrt_ctx {
        ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:175:8: note: originally defined here
 struct vrt_ctx {
        ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:216:8: error: redefinition of ‘struct vmod_data’
 struct vmod_data {
        ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:216:8: note: originally defined here
 struct vmod_data {
        ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:234:6: error: nested redefinition of ‘enum vcl_event_e’
 enum vcl_event_e {
      ^
/usr/include/varnish/vrt.h:234:6: error: redeclaration of ‘enum vcl_event_e’
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:234:6: note: originally defined here
 enum vcl_event_e {
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:235:2: error: redeclaration of enumerator ‘VCL_EVENT_LOAD’
  VCL_EVENT_LOAD,
  ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:235:2: note: previous definition of ‘VCL_EVENT_LOAD’ was here
  VCL_EVENT_LOAD,
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:236:2: error: redeclaration of enumerator ‘VCL_EVENT_WARM’
  VCL_EVENT_WARM,
  ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:236:2: note: previous definition of ‘VCL_EVENT_WARM’ was here
  VCL_EVENT_WARM,
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:237:2: error: redeclaration of enumerator ‘VCL_EVENT_COLD’
  VCL_EVENT_COLD,
  ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:237:2: note: previous definition of ‘VCL_EVENT_COLD’ was here
  VCL_EVENT_COLD,
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:238:2: error: redeclaration of enumerator ‘VCL_EVENT_DISCARD’
  VCL_EVENT_DISCARD,
  ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:238:2: note: previous definition of ‘VCL_EVENT_DISCARD’ was here
  VCL_EVENT_DISCARD,
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:284:8: error: redefinition of ‘struct vrt_backend’
 struct vrt_backend {
        ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:284:8: note: originally defined here
 struct vrt_backend {
        ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:311:8: error: redefinition of ‘struct vrt_backend_probe’
 struct vrt_backend_probe {
        ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:152:22: note: originally defined here
 typedef const struct vrt_backend_probe * VCL_PROBE;
                      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:323:8: error: redefinition of ‘struct vrt_ref’
 struct vrt_ref {
        ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:323:8: note: originally defined here
 struct vrt_ref {
        ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:331:6: error: conflicting types for ‘VRT_count’
 void VRT_count(VRT_CTX, unsigned);
      ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:331:6: note: previous declaration of ‘VRT_count’ was here
 void VRT_count(VRT_CTX, unsigned);
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:337:13: error: conflicting types for ‘acl_match_f’
 typedef int acl_match_f(VRT_CTX, const VCL_IP);
             ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:337:13: note: previous declaration of ‘acl_match_f’ was here
 typedef int acl_match_f(VRT_CTX, const VCL_IP);
             ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:339:8: error: redefinition of ‘struct vrt_acl’
 struct vrt_acl {
        ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:120:8: note: originally defined here
 struct vrt_acl;
        ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:345:6: error: conflicting types for ‘VRT_acl_log’
 void VRT_acl_log(VRT_CTX, const char *);
      ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:345:6: note: previous declaration of ‘VRT_acl_log’ was here
 void VRT_acl_log(VRT_CTX, const char *);
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:346:5: error: conflicting types for ‘VRT_acl_match’
 int VRT_acl_match(VRT_CTX, VCL_ACL, VCL_IP);
     ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:346:5: note: previous declaration of ‘VRT_acl_match’ was here
 int VRT_acl_match(VRT_CTX, VCL_ACL, VCL_IP);
     ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:354:5: error: conflicting types for ‘VRT_re_match’
 int VRT_re_match(VRT_CTX, const char *, void *);
     ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:354:5: note: previous declaration of ‘VRT_re_match’ was here
 int VRT_re_match(VRT_CTX, const char *, void *);
     ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:360:6: error: nested redefinition of ‘enum gethdr_e’
 enum gethdr_e {
      ^
/usr/include/varnish/vrt.h:360:6: error: redeclaration of ‘enum gethdr_e’
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:360:6: note: originally defined here
 enum gethdr_e {
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:361:2: error: redeclaration of enumerator ‘HDR_REQ’
  HDR_REQ,
  ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:361:2: note: previous definition of ‘HDR_REQ’ was here
  HDR_REQ,
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:362:2: error: redeclaration of enumerator ‘HDR_REQ_TOP’
  HDR_REQ_TOP,
  ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:362:2: note: previous definition of ‘HDR_REQ_TOP’ was here
  HDR_REQ_TOP,
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:363:2: error: redeclaration of enumerator ‘HDR_RESP’
  HDR_RESP,
  ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:363:2: note: previous definition of ‘HDR_RESP’ was here
  HDR_RESP,
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:364:2: error: redeclaration of enumerator ‘HDR_OBJ’
  HDR_OBJ,
  ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:364:2: note: previous definition of ‘HDR_OBJ’ was here
  HDR_OBJ,
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:365:2: error: redeclaration of enumerator ‘HDR_BEREQ’
  HDR_BEREQ,
  ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:365:2: note: previous definition of ‘HDR_BEREQ’ was here
  HDR_BEREQ,
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:366:2: error: redeclaration of enumerator ‘HDR_BERESP’
  HDR_BERESP
  ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:366:2: note: previous definition of ‘HDR_BERESP’ was here
  HDR_BERESP
  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:369:8: error: redefinition of ‘struct gethdr_s’
 struct gethdr_s {
        ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:147:22: note: originally defined here
 typedef const struct gethdr_s *   VCL_HEADER;
                      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:374:10: error: conflicting types for ‘VRT_selecthttp’
 VCL_HTTP VRT_selecthttp(VRT_CTX, enum gethdr_e);
          ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:374:10: note: previous declaration of ‘VRT_selecthttp’ was here
 VCL_HTTP VRT_selecthttp(VRT_CTX, enum gethdr_e);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:375:12: error: conflicting types for ‘VRT_GetHdr’
 VCL_STRING VRT_GetHdr(VRT_CTX, const struct gethdr_s *);
            ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:375:12: note: previous declaration of ‘VRT_GetHdr’ was here
 VCL_STRING VRT_GetHdr(VRT_CTX, const struct gethdr_s *);
            ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:381:11: error: conflicting types for ‘VRT_CacheReqBody’
 VCL_BYTES VRT_CacheReqBody(VRT_CTX, VCL_BYTES maxsize);
           ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:381:11: note: previous declaration of ‘VRT_CacheReqBody’ was here
 VCL_BYTES VRT_CacheReqBody(VRT_CTX, VCL_BYTES maxsize);
           ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:385:13: error: conflicting types for ‘VRT_regsub’
 const char *VRT_regsub(VRT_CTX, int all, const char *, void *, const char *);
             ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:385:13: note: previous declaration of ‘VRT_regsub’ was here
 const char *VRT_regsub(VRT_CTX, int all, const char *, void *, const char *);
             ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:386:10: error: conflicting types for ‘VRT_ban_string’
 VCL_VOID VRT_ban_string(VRT_CTX, VCL_STRING);
          ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:386:10: note: previous declaration of ‘VRT_ban_string’ was here
 VCL_VOID VRT_ban_string(VRT_CTX, VCL_STRING);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:387:9: error: conflicting types for ‘VRT_purge’
 VCL_INT VRT_purge(VRT_CTX, VCL_DURATION, VCL_DURATION, VCL_DURATION);
         ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:387:9: note: previous declaration of ‘VRT_purge’ was here
 VCL_INT VRT_purge(VRT_CTX, VCL_DURATION, VCL_DURATION, VCL_DURATION);
         ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:388:10: error: conflicting types for ‘VRT_synth’
 VCL_VOID VRT_synth(VRT_CTX, VCL_INT, VCL_STRING);
          ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:388:10: note: previous declaration of ‘VRT_synth’ was here
 VCL_VOID VRT_synth(VRT_CTX, VCL_INT, VCL_STRING);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:389:10: error: conflicting types for ‘VRT_hit_for_pass’
 VCL_VOID VRT_hit_for_pass(VRT_CTX, VCL_DURATION);
          ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:389:10: note: previous declaration of ‘VRT_hit_for_pass’ was here
 VCL_VOID VRT_hit_for_pass(VRT_CTX, VCL_DURATION);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:391:10: error: conflicting types for ‘VRT_SetHdr’
 VCL_VOID VRT_SetHdr(VRT_CTX, const struct gethdr_s *, const char *, ...);
          ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:391:10: note: previous declaration of ‘VRT_SetHdr’ was here
 VCL_VOID VRT_SetHdr(VRT_CTX, const struct gethdr_s *, const char *, ...);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:392:10: error: conflicting types for ‘VRT_handling’
 VCL_VOID VRT_handling(VRT_CTX, unsigned hand);
          ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:392:10: note: previous declaration of ‘VRT_handling’ was here
 VCL_VOID VRT_handling(VRT_CTX, unsigned hand);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:393:10: error: conflicting types for ‘VRT_fail’
 VCL_VOID VRT_fail(VRT_CTX, const char *fmt, ...) v_printflike_(2,3);
          ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:393:10: note: previous declaration of ‘VRT_fail’ was here
 VCL_VOID VRT_fail(VRT_CTX, const char *fmt, ...) v_printflike_(2,3);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:394:10: error: conflicting types for ‘VRT_hashdata’
 VCL_VOID VRT_hashdata(VRT_CTX, const char *str, ...);
          ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:394:10: note: previous declaration of ‘VRT_hashdata’ was here
 VCL_VOID VRT_hashdata(VRT_CTX, const char *str, ...);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:400:10: error: conflicting types for ‘VRT_blob’
 VCL_BLOB VRT_blob(VRT_CTX, const char *, const void *, size_t);
          ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:400:10: note: previous declaration of ‘VRT_blob’ was here
 VCL_BLOB VRT_blob(VRT_CTX, const char *, const void *, size_t);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:402:10: error: conflicting types for ‘VRT_Rollback’
 VCL_VOID VRT_Rollback(VRT_CTX, VCL_HTTP);
          ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:402:10: note: previous declaration of ‘VRT_Rollback’ was here
 VCL_VOID VRT_Rollback(VRT_CTX, VCL_HTTP);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:405:10: error: conflicting types for ‘VRT_synth_page’
 VCL_VOID VRT_synth_page(VRT_CTX, const char *, ...);
          ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:405:10: note: previous declaration of ‘VRT_synth_page’ was here
 VCL_VOID VRT_synth_page(VRT_CTX, const char *, ...);
          ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:408:18: error: conflicting types for ‘VRT_new_backend’
 struct director *VRT_new_backend(VRT_CTX, const struct vrt_backend *);
                  ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:408:18: note: previous declaration of ‘VRT_new_backend’ was here
 struct director *VRT_new_backend(VRT_CTX, const struct vrt_backend *);
                  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:409:18: error: conflicting types for ‘VRT_new_backend_clustered’
 struct director *VRT_new_backend_clustered(VRT_CTX,
                  ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:409:18: note: previous declaration of ‘VRT_new_backend_clustered’ was here
 struct director *VRT_new_backend_clustered(VRT_CTX,
                  ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:411:8: error: conflicting types for ‘VRT_backend_vsm_need’
 size_t VRT_backend_vsm_need(VRT_CTX);
        ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:411:8: note: previous declaration of ‘VRT_backend_vsm_need’ was here
 size_t VRT_backend_vsm_need(VRT_CTX);
        ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:412:6: error: conflicting types for ‘VRT_delete_backend’
 void VRT_delete_backend(VRT_CTX, struct director **);
      ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:412:6: note: previous declaration of ‘VRT_delete_backend’ was here
 void VRT_delete_backend(VRT_CTX, struct director **);
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:413:5: error: conflicting types for ‘VRT_backend_healthy’
 int VRT_backend_healthy(VRT_CTX, struct director *);
     ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:413:5: note: previous declaration of ‘VRT_backend_healthy’ was here
 int VRT_backend_healthy(VRT_CTX, struct director *);
     ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:416:22: error: conflicting types for ‘VRT_VSM_Cluster_New’
 struct vsmw_cluster *VRT_VSM_Cluster_New(VRT_CTX, size_t);
                      ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:416:22: note: previous declaration of ‘VRT_VSM_Cluster_New’ was here
 struct vsmw_cluster *VRT_VSM_Cluster_New(VRT_CTX, size_t);
                      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:417:6: error: conflicting types for ‘VRT_VSM_Cluster_Destroy’
 void VRT_VSM_Cluster_Destroy(VRT_CTX, struct vsmw_cluster **);
      ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:417:6: note: previous declaration of ‘VRT_VSM_Cluster_Destroy’ was here
 void VRT_VSM_Cluster_Destroy(VRT_CTX, struct vsmw_cluster **);
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:420:5: error: conflicting types for ‘VRT_Healthy’
 int VRT_Healthy(VRT_CTX, VCL_BACKEND);
     ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:420:5: note: previous declaration of ‘VRT_Healthy’ was here
 int VRT_Healthy(VRT_CTX, VCL_BACKEND);
     ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:426:5: error: conflicting types for ‘VRT_Vmod_Init’
 int VRT_Vmod_Init(VRT_CTX, struct vmod **hdl, void *ptr, int len,
     ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:426:5: note: previous declaration of ‘VRT_Vmod_Init’ was here
 int VRT_Vmod_Init(VRT_CTX, struct vmod **hdl, void *ptr, int len,
     ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:431:9: error: conflicting types for ‘VRT_vcl_get’
 VCL_VCL VRT_vcl_get(VRT_CTX, const char *);
         ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:431:9: note: previous declaration of ‘VRT_vcl_get’ was here
 VCL_VCL VRT_vcl_get(VRT_CTX, const char *);
         ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:432:6: error: conflicting types for ‘VRT_vcl_rel’
 void VRT_vcl_rel(VRT_CTX, VCL_VCL);
      ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:432:6: note: previous declaration of ‘VRT_vcl_rel’ was here
 void VRT_vcl_rel(VRT_CTX, VCL_VCL);
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:433:6: error: conflicting types for ‘VRT_vcl_select’
 void VRT_vcl_select(VRT_CTX, VCL_VCL);
      ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:433:6: note: previous declaration of ‘VRT_vcl_select’ was here
 void VRT_vcl_select(VRT_CTX, VCL_VCL);
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:435:13: error: conflicting types for ‘vmod_event_f’
 typedef int vmod_event_f(VRT_CTX, struct vmod_priv *, enum vcl_event_e);
             ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:435:13: note: previous declaration of ‘vmod_event_f’ was here
 typedef int vmod_event_f(VRT_CTX, struct vmod_priv *, enum vcl_event_e);
             ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:438:8: error: redefinition of ‘struct vmod_priv’
 struct vmod_priv {
        ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:119:8: note: originally defined here
 struct vmod_priv;
        ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:445:17: error: conflicting types for ‘VRT_ref_vcl’
 struct vclref * VRT_ref_vcl(VRT_CTX, const char *);
                 ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:445:17: note: previous declaration of ‘VRT_ref_vcl’ was here
 struct vclref * VRT_ref_vcl(VRT_CTX, const char *);
                 ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:446:6: error: conflicting types for ‘VRT_rel_vcl’
 void VRT_rel_vcl(VRT_CTX, struct vclref **);
      ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:446:6: note: previous declaration of ‘VRT_rel_vcl’ was here
 void VRT_rel_vcl(VRT_CTX, struct vclref **);
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:448:6: error: conflicting types for ‘VRT_priv_fini’
 void VRT_priv_fini(const struct vmod_priv *p);
      ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:448:6: note: previous declaration of ‘VRT_priv_fini’ was here
 void VRT_priv_fini(const struct vmod_priv *p);
      ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:449:19: error: conflicting types for ‘VRT_priv_task’
 struct vmod_priv *VRT_priv_task(VRT_CTX, const void *vmod_id);
                   ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:449:19: note: previous declaration of ‘VRT_priv_task’ was here
 struct vmod_priv *VRT_priv_task(VRT_CTX, const void *vmod_id);
                   ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:450:19: error: conflicting types for ‘VRT_priv_top’
 struct vmod_priv *VRT_priv_top(VRT_CTX, const void *vmod_id);
                   ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:450:19: note: previous declaration of ‘VRT_priv_top’ was here
 struct vmod_priv *VRT_priv_top(VRT_CTX, const void *vmod_id);
                   ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:458:13: error: conflicting types for ‘VRT_BundleStrands’
 VCL_STRANDS VRT_BundleStrands(int, struct strands *, char const **,
             ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:458:13: note: previous declaration of ‘VRT_BundleStrands’ was here
 VCL_STRANDS VRT_BundleStrands(int, struct strands *, char const **,
             ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:460:5: error: conflicting types for ‘VRT_CompareStrands’
 int VRT_CompareStrands(VCL_STRANDS a, VCL_STRANDS b);
     ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:460:5: note: previous declaration of ‘VRT_CompareStrands’ was here
 int VRT_CompareStrands(VCL_STRANDS a, VCL_STRANDS b);
     ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:464:12: error: conflicting types for ‘VRT_CollectString’
 VCL_STRING VRT_CollectString(VRT_CTX, const char *p, ...);
            ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:464:12: note: previous declaration of ‘VRT_CollectString’ was here
 VCL_STRING VRT_CollectString(VRT_CTX, const char *p, ...);
            ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:465:12: error: conflicting types for ‘VRT_INT_string’
 VCL_STRING VRT_INT_string(VRT_CTX, VCL_INT);
            ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:465:12: note: previous declaration of ‘VRT_INT_string’ was here
 VCL_STRING VRT_INT_string(VRT_CTX, VCL_INT);
            ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:466:12: error: conflicting types for ‘VRT_IP_string’
 VCL_STRING VRT_IP_string(VRT_CTX, VCL_IP);
            ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:466:12: note: previous declaration of ‘VRT_IP_string’ was here
 VCL_STRING VRT_IP_string(VRT_CTX, VCL_IP);
            ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:467:12: error: conflicting types for ‘VRT_REAL_string’
 VCL_STRING VRT_REAL_string(VRT_CTX, VCL_REAL);
            ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:467:12: note: previous declaration of ‘VRT_REAL_string’ was here
 VCL_STRING VRT_REAL_string(VRT_CTX, VCL_REAL);
            ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:469:12: error: conflicting types for ‘VRT_STRANDS_string’
 VCL_STRING VRT_STRANDS_string(VCL_STRANDS);
            ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:469:12: note: previous declaration of ‘VRT_STRANDS_string’ was here
 VCL_STRING VRT_STRANDS_string(VCL_STRANDS);
            ^
In file included from vmod_core.h:8:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:470:12: error: conflicting types for ‘VRT_TIME_string’
 VCL_STRING VRT_TIME_string(VRT_CTX, VCL_TIME);
            ^
In file included from /usr/include/varnish/cache/cache.h:45:0,
                 from vmod_core.h:6,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vrt.h:470:12: note: previous declaration of ‘VRT_TIME_string’ was here
 VCL_STRING VRT_TIME_string(VRT_CTX, VCL_TIME);
            ^
vmod_bodyaccess.c: In function ‘vmod_hash_req_body’:
vmod_bodyaccess.c:21:8: error: implicit declaration of function ‘VSB_new_auto’ [-Werror=implicit-function-declaration]
  vsb = VSB_new_auto();
        ^
vmod_bodyaccess.c:21:6: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
  vsb = VSB_new_auto();
      ^
vmod_bodyaccess.c:24:30: error: implicit declaration of function ‘VSB_data’ [-Werror=implicit-function-declaration]
  HSH_AddBytes(ctx->req, ctx, VSB_data(vsb),  VSB_len(vsb));
                              ^
vmod_bodyaccess.c:24:46: error: implicit declaration of function ‘VSB_len’ [-Werror=implicit-function-declaration]
  HSH_AddBytes(ctx->req, ctx, VSB_data(vsb),  VSB_len(vsb));
                                              ^
vmod_bodyaccess.c:24:30: error: passing argument 3 of ‘HSH_AddBytes’ makes pointer from integer without a cast [-Werror=int-conversion]
  HSH_AddBytes(ctx->req, ctx, VSB_data(vsb),  VSB_len(vsb));
                              ^
In file included from vmod_bodyaccess.c:1:0:
vmod_core.h:19:6: note: expected ‘const void *’ but argument is of type ‘int’
 void HSH_AddBytes(const struct req *req, const struct vrt_ctx *ctx,
      ^
vmod_bodyaccess.c:26:2: error: implicit declaration of function ‘VSB_delete’ [-Werror=implicit-function-declaration]
  VSB_delete(vsb);
  ^
vmod_bodyaccess.c: In function ‘vmod_rematch_req_body’:
vmod_bodyaccess.c:87:6: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
  vsb = VSB_new_auto();
      ^
vmod_bodyaccess.c:90:32: error: passing argument 2 of ‘VRE_exec’ makes pointer from integer without a cast [-Werror=int-conversion]
  i = VRE_exec(priv_call->priv, VSB_data(vsb), VSB_len(vsb), 0, 0,
                                ^
In file included from vmod_core.h:7:0,
                 from vmod_bodyaccess.c:1:
/usr/include/varnish/vre.h:56:5: note: expected ‘const char *’ but argument is of type ‘int’
 int VRE_exec(const vre_t *code, const char *subject, int length,
     ^
cc1: all warnings being treated as errors
Makefile:456: recipe for target 'vmod_bodyaccess.lo' failed
make[2]: *** [vmod_bodyaccess.lo] Error 1
make[2]: Leaving directory '/home/jmango/libvmod-bodyaccess/src'
Makefile:519: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/jmango/libvmod-bodyaccess'
Makefile:387: recipe for target 'all' failed
make: *** [all] Error 2

Can you give me some suggestion ?

Varnish 4.1.2 - Body not included on bereq after std.CacheReqBody()

I'm trying to use libvmod-bodyaccess to cache post requests.

I'm finding that the call to std.CacheReqBody() consumes the request body, and it doesn't get passed on to the back-end request. I don't see any indication of how to populate the bereq with a body.

I understood the use case of caching post requests to be exactly the purpose of this module, but I don't seem to be able to construct a complete system. How can I both cache the request body, so as to use it in the hash, and still pass it through on the back end?

Add function for parse body

Hi,

"rematch_req_body" is useful, but it would be practical to have a function that parses the body.

Example with old mod "libvmod-parsereq":


vcl_xxxx {
set resp.http.hoge = parsereq.param(post, "hoge");
}

//return
hoge: hogevalue


Could you add this function ?

Update docs

Misleading documentation, buffer_req_something returns a boolean now.

Error after ran 'make'

I was installing this module when I received the error below:

 In file included from vmod_core.h:6:0,
                  from vmod_core.c:1:
 /usr/include/varnish/cache/cache.h:917:9: note: expected 'int (*)(struct req *, void *, void *, size_t)' but argument is of type 'int (*)(void *, int,  const void *, ssize_t)'
  ssize_t VRB_Iterate(struct req *req, req_body_iter_f *func, void *priv);
          ^
 cc1: all warnings being treated as errors
 make[2]: ** [vmod_core.lo] Error 1
 make[2]: Exiting directory '/root/libvmod-bodyaccess/src'
 make[1]: ** [all-recursive] Error 1
 make[1]: Exiting directory '/root/libvmod-bodyaccess'
 make: ** [all] Error 2

This happened when I ran make.
My Environment is: CentOS Linux release 7.2.1511 (Core)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.