int main(int argc, char** argv) {
return cmkcheckweak == NULL;
}" HAVE_WEAK_SYMBOLS)
+CHECK_C_SOURCE_COMPILES(
+ "#include <time.h>
+ extern char *tzname[2];
+ extern long timezone;
+ extern int daylight;
+ int main(int argc, char** argv) {
+ tzset();
+ return timezone;
+ }" HAVE_SANE_TZSET)
IF(WITH_ICONV)
CHECK_C_SOURCE_COMPILES("
#cmakedefine HAVE_READPASSPHRASE_H 1
#cmakedefine HAVE_SA_SIGINFO 1
#cmakedefine HAVE_SANE_SHMEM 1
+#cmakedefine HAVE_SANE_TZSET 1
#cmakedefine HAVE_SCHED_YEILD 1
#cmakedefine HAVE_SC_NPROCESSORS_ONLN 1
#cmakedefine HAVE_SEARCH_H 1
dest->tm_zone = "GMT";
}
+#ifdef HAVE_SANE_TZSET
extern char *tzname[2];
extern long timezone;
extern int daylight;
#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)
{