From: Sebastian Harl Date: Fri, 8 Nov 2013 13:19:10 +0000 (+0100) Subject: Fixed compilation with PostgreSQL 9.2. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5ff45cf49816b4839224edf89c59a5c77ceba4b5;p=postrr.git Fixed compilation with PostgreSQL 9.2. Now, it doesn't compile with 9.1, though, but that's old anyway ;-) --- 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));