diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/getla.c | 4 | ||||
-rw-r--r-- | src/tbf.c | 2 | ||||
-rw-r--r-- | src/tbf.h | 7 |
4 files changed, 11 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 36870ee..f296b3c 100644 --- a/configure.ac +++ b/configure.ac @@ -46,7 +46,7 @@ AC_CHECK_HEADERS(sys/sysinfo.h) # Check for functions AC_CHECK_FUNCS(sysinfo getloadavg) -AM_VARNISHAPI([4.1],[6.3.1]) +AM_VARNISHAPI([4.1],[6.3.2]) AC_DEFINE_UNQUOTED([VARNISHAPI_MAJOR],[$VARNISHAPI_MAJOR], [Varnish API major version number]) diff --git a/src/getla.c b/src/getla.c index 473cd01..ce4095c 100644 --- a/src/getla.c +++ b/src/getla.c @@ -1,5 +1,5 @@ /* This file is part of vmod-tbf - Copyright (C) 2013-2017 Sergey Poznyakoff + Copyright (C) 2013-2020 Sergey Poznyakoff Vmod-tbf is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>. */ -#define _BSD_SOURCE +#define _DEFAULT_SOURCE #include "tbf.h" #if defined(HAVE_SYSINFO) && defined(HAVE_SYS_SYSINFO_H) # include <sys/sysinfo.h> @@ -846,7 +846,7 @@ tbf_exit(void) } int -vmod_tbf_event(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e) +VEVENT(tbf_event)(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e) { switch (e) { case VCL_EVENT_LOAD: @@ -39,6 +39,13 @@ #endif #define WSPTR(s) ((s)->ws) +#ifdef VPFX +# define VEVENT(a) VPFX(a) +#else +/* For compatibility with varnish prior to 6.2 */ +# define VEVENT(a) a +#endif + #ifndef USEC_PER_SEC # define USEC_PER_SEC 1000000L #endif |