From 5ff45cf49816b4839224edf89c59a5c77ceba4b5 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Fri, 8 Nov 2013 14:19:10 +0100 Subject: [PATCH] Fixed compilation with PostgreSQL 9.2. Now, it doesn't compile with 9.1, though, but that's old anyway ;-) --- src/rrtimeslice.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rrtimeslice.c b/src/rrtimeslice.c index 1e8283c..d9b8275 100644 --- a/src/rrtimeslice.c +++ b/src/rrtimeslice.c @@ -374,7 +374,7 @@ rrtimeslice_out(PG_FUNCTION_ARGS) fsec_t fsec = 0; int tz = 0; - char *tz_str = NULL; + const char *tz_str = NULL; char ts_str[MAXDATELEN + 1]; char buf_l[MAXDATELEN + 1]; @@ -399,7 +399,7 @@ rrtimeslice_out(PG_FUNCTION_ARGS) errmsg("invalid (non-finite) timestamp") )); - EncodeDateTime(&tm, fsec, &tz, &tz_str, DateStyle, buf_u); + EncodeDateTime(&tm, fsec, 1, tz, tz_str, DateStyle, buf_u); if (! rrtimeslice_get_spec(tslice->tsid, &len, &num)) { TimestampTz lower = tslice->tstamp - (len * USECS_PER_SEC); @@ -410,7 +410,7 @@ rrtimeslice_out(PG_FUNCTION_ARGS) errmsg("invalid (non-finite) lower timestamp") )); - EncodeDateTime(&tm, fsec, &tz, &tz_str, DateStyle, buf_l); + EncodeDateTime(&tm, fsec, 1, tz, tz_str, DateStyle, buf_l); } else { strncpy(buf_l, "ERR", sizeof(buf_l)); -- 2.30.2