summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2020-03-23 15:46:47 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2020-03-23 15:46:47 (GMT)
commit87ff2f5ebb147d6800b838d8e9dd6063305ddd47 (patch) (side-by-side diff)
treeefd4a7b00276286221a71229a4f42226a71c83bd
parent347da6028be9ae8ea1b5ac0a82ad7783780e6782 (diff)
downloadvmod-dict-87ff2f5ebb147d6800b838d8e9dd6063305ddd47.tar.gz
vmod-dict-87ff2f5ebb147d6800b838d8e9dd6063305ddd47.tar.bz2
Restore backward compatibility with <6.2
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--configure.ac2
-rw-r--r--src/vmod_dict.c10
2 files changed, 10 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 1dc3887..c37cc81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,13 +42,13 @@ AC_PROG_MAKE_SET
# Checks for header files.
AC_HEADER_STDC
# Check for functions
-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])
AC_CONFIG_TESTDIR(tests)
AC_CONFIG_FILES([tests/Makefile tests/atlocal])
AM_MISSING_PROG([AUTOM4TE], [autom4te])
diff --git a/src/vmod_dict.c b/src/vmod_dict.c
index 81f35e2..8c1e230 100644
--- a/src/vmod_dict.c
+++ b/src/vmod_dict.c
@@ -29,12 +29,20 @@
#else
# include <vcl.h>
# include <vrt.h>
# include <vcc_if.h>
# include <cache/cache.h>
#endif
+
+#ifdef VPFX
+# define VEVENT(a) VPFX(a)
+#else
+/* For compatibility with varnish prior to 6.2 */
+# define VEVENT(a) a
+#endif
+
#include <vas.h>
struct entry
{
char *key;
char *val;
@@ -371,13 +379,13 @@ fill_table(void)
next_size = next_size * 2 + 1;
} while (next_size < max_hash_size);
}
int
-vmod_dict_event(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
+VEVENT(dict_event)(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
{
switch (e) {
case VCL_EVENT_LOAD:
pthread_rwlock_init(&rwlock, NULL);
break;

Return to:

Send suggestions and report system problems to the System administrator.