diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-02-18 17:08:48 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-02-18 17:08:48 +0000 |
commit | 6ecb7d259df0c2fe07e3ea99442c1d9228033ee8 (patch) | |
tree | 425937594438dbd438657b70e090fcc36b27590e /src | |
parent | 8f419996786af380a3bc96ddc55d3a295991d7ef (diff) | |
download | rspamd-6ecb7d259df0c2fe07e3ea99442c1d9228033ee8.tar.gz rspamd-6ecb7d259df0c2fe07e3ea99442c1d9228033ee8.zip |
[Fix] Add workaround for system with non-XSI compatible tzset
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/util.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libutil/util.c b/src/libutil/util.c index 5e271ed80..d1500b54a 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -2762,6 +2762,7 @@ rspamd_gmtime (gint64 ts, struct tm *dest) dest->tm_zone = "GMT"; } +#ifdef HAVE_SANE_TZSET extern char *tzname[2]; extern long timezone; extern int daylight; @@ -2784,6 +2785,14 @@ void rspamd_localtime (gint64 ts, struct tm *dest) #endif } +#else +void rspamd_localtime (gint64 ts, struct tm *dest) +{ + time_t t = ts; + localtime_r (&t, dest); +} +#endif + gboolean rspamd_fstring_gzip (rspamd_fstring_t **in) { |