compat UPDATE support for timegm
diff --git a/compat/compat.h.in b/compat/compat.h.in
index c697d6c..6df7a7b 100644
--- a/compat/compat.h.in
+++ b/compat/compat.h.in
@@ -70,6 +70,7 @@
#cmakedefine HAVE_REALPATH
#cmakedefine HAVE_LOCALTIME_R
#cmakedefine HAVE_GMTIME_R
+#cmakedefine HAVE_TIMEGM
#cmakedefine HAVE_STRPTIME
#cmakedefine HAVE_MMAP
#cmakedefine HAVE_DIRNAME
@@ -188,6 +189,14 @@
struct tm *localtime_r(const time_t *timep, struct tm *result);
#endif
+#ifndef HAVE_TIMEGM
+# if defined (_WIN32)
+# define timegm _mkgmtime
+# else
+# error No timegm() implementation for this platform is available.
+# endif
+#endif
+
#ifndef HAVE_STRPTIME
char *strptime(const char *s, const char *format, struct tm *tm);
#endif