diff options
-rw-r--r-- | varnishapi.m4 | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/varnishapi.m4 b/varnishapi.m4 index 1d1107b..129d66a 100644 --- a/varnishapi.m4 +++ b/varnishapi.m4 @@ -131,17 +131,19 @@ AC_DEFUN([AM_VARNISHAPI], * versions 6.1 and 6.2 only to resurge in 6.3, with the additional * notice that they are going to replace the WS_Reserve function, * which will be removed after 2020-09-15. * (see http://varnish-cache.org/docs/trunk/whats-new/upgrading-6.3.html) * These macros work around this vacillation. */ -#if !HAVE_DECL_WS_RESERVEALL -# define WS_ReserveAll(ws) WS_Reserve(ws,0) -#endif -#if !HAVE_DECL_WS_RESERVESIZE -# define WS_ReserveSize(ws,sz) WS_Reserve(ws,sz) +#if VARNISHAPI_MAJOR == 6 +# if !HAVE_DECL_WS_RESERVEALL +# define WS_ReserveAll(ws) WS_Reserve(ws,0) +# endif +# if !HAVE_DECL_WS_RESERVESIZE +# define WS_ReserveSize(ws,sz) WS_Reserve(ws,sz) +# endif #endif ]) fi # vmod installation dir AC_ARG_VAR([VMODDIR], [vmod installation directory]) |