notmuch/compat/have_timegm.c
Blake Jones 8c6b2e7e9d timegm: add portable implementation (Solaris support)
The timegm(3) function is a non-standard extension to libc which is
available in GNU libc and on some BSDs.  Although SunOS had this
function in its libc, Solaris (unfortunately) removed it.  This patch
implements a very simple version of timegm() which is good enough for
parse-time-string.c.

Signed-off-by: Vladimir Marek <vlmarek@volny.cz>
2013-08-23 17:57:35 +02:00

7 lines
95 B
C

#include <time.h>
#include "compat.h"
int main()
{
return (int) timegm((struct tm *)0);
}