File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Resources/doc/reference/configuration Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -336,6 +336,10 @@ you need to extend your varnish ``vcl_fetch`` configuration:
336336
337337.. code-block :: c
338338
339+ C{
340+ #include <stdlib.h>
341+ }C
342+
339343 sub vcl_fetch {
340344 if (beresp.http.X-Reverse-Proxy-TTL) {
341345 C{
@@ -347,6 +351,12 @@ you need to extend your varnish ``vcl_fetch`` configuration:
347351 }
348352 }
349353
354+ The import for ``stdlib.h `` has to be outside of any ``vcl_X `` sub routines.
355+ Omitting the ``stdlib `` inclusion will result in a compile error complaining
356+ that ``atoi `` is not defined, and including the header file inside a VCL sub
357+ routine leads to a C compile failure mentioning
358+ ``invalid storage class for function __bswap_32 ``.
359+
350360Note that there is a ``beresp.ttl `` field in VCL but unfortunately it can only
351361be set to absolute values and not dynamically. Thus we have to revert to a C
352362code fragment.
You can’t perform that action at this time.
0 commit comments