File tree 1 file changed +10
-0
lines changed
Resources/doc/reference/configuration 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:
336
336
337
337
.. code-block :: c
338
338
339
+ C{
340
+ #include <stdlib.h>
341
+ }C
342
+
339
343
sub vcl_fetch {
340
344
if (beresp.http.X-Reverse-Proxy-TTL) {
341
345
C{
@@ -347,6 +351,12 @@ you need to extend your varnish ``vcl_fetch`` configuration:
347
351
}
348
352
}
349
353
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
+ routing leads to a C compile failure mentioning
358
+ ``invalid storage class for function __bswap_32 ``.
359
+
350
360
Note that there is a ``beresp.ttl `` field in VCL but unfortunately it can only
351
361
be set to absolute values and not dynamically. Thus we have to revert to a C
352
362
code fragment.
You can’t perform that action at this time.
0 commit comments