On Tue, Oct 27 2020, Theo Buehler <tb@theobuehler.org> wrote:
> Raltively simple update to Redis 6.0.9.
>
> Upgrade urgency is MODERATE due to a local patch for zmalloc. Thanks to
> the upstream fix, we can now remove it. We need a new trivial time_t
> patch.
[...]
> Index: patches/patch-src_debug_c
> ===================================================================
> RCS file: patches/patch-src_debug_c
> diff -N patches/patch-src_debug_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_debug_c 27 Oct 2020 12:59:32 -0000
> @@ -0,0 +1,16 @@
> +$OpenBSD$
> +
> +time_t is long long on OpenBSD
> +
> +Index: src/debug.c
> +--- src/debug.c.orig
> ++++ src/debug.c
> +@@ -408,7 +408,7 @@ NULL
> + } else if (!strcasecmp(c->argv[1]->ptr,"segfault")) {
> + *((char*)-1) = 'x';
> + } else if (!strcasecmp(c->argv[1]->ptr,"panic")) {
> +- serverPanic("DEBUG PANIC called at Unix time %ld", time(NULL));
> ++ serverPanic("DEBUG PANIC called at Unix time %lld", time(NULL));
The preferred approach would be
++ serverPanic("DEBUG PANIC called at Unix time %lld", (long long)time(NULL));
which can usually be pushed upstream. redis seems to use "long long"
already so it shouldn't be a problem.
> + } else if (!strcasecmp(c->argv[1]->ptr,"restart") ||
> + !strcasecmp(c->argv[1]->ptr,"crash-and-recover"))
> + {
--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
No comments:
Post a Comment