aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-03-23 17:40:57 +0200
committerSergey Poznyakoff <gray@gnu.org>2020-03-23 17:40:57 +0200
commit1ddd47d953e959358846e5051aacc5aad17e89d9 (patch)
treede6d7a43cc8dece3cf54dc3a9025572380c3d73f
parent51dabbd7c63995b58168f5dc486b31842c7db9c4 (diff)
downloadvmod-tbf-1ddd47d953e959358846e5051aacc5aad17e89d9.tar.gz
vmod-tbf-1ddd47d953e959358846e5051aacc5aad17e89d9.tar.bz2
Works with Varnish 6.3.2. Restore backward compatibility with <6.2
-rw-r--r--configure.ac2
-rw-r--r--src/getla.c4
-rw-r--r--src/tbf.c2
-rw-r--r--src/tbf.h7
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
@@ -48,3 +48,3 @@ 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],
diff --git a/src/getla.c b/src/getla.c
index 473cd01..ce4095c 100644
--- a/src/getla.c
+++ b/src/getla.c
@@ -1,3 +1,3 @@
/* This file is part of vmod-tbf
- Copyright (C) 2013-2017 Sergey Poznyakoff
+ Copyright (C) 2013-2020 Sergey Poznyakoff
@@ -16,3 +16,3 @@
*/
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
#include "tbf.h"
diff --git a/src/tbf.c b/src/tbf.c
index f1d0878..097f15a 100644
--- a/src/tbf.c
+++ b/src/tbf.c
@@ -848,3 +848,3 @@ 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)
{
diff --git a/src/tbf.h b/src/tbf.h
index a138eeb..1a851c7 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -41,2 +41,9 @@
+#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

Return to:

Send suggestions and report system problems to the System administrator.