From 8c6b2e7e9d30bb3a9ef4fd8632cbf6d8d0673bb7 Mon Sep 17 00:00:00 2001 From: Blake Jones Date: Wed, 21 Aug 2013 13:09:54 +0200 Subject: 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 --- compat/have_timegm.c | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 compat/have_timegm.c (limited to 'compat/have_timegm.c') diff --git a/compat/have_timegm.c b/compat/have_timegm.c new file mode 100644 index 00000000..b62b7937 --- /dev/null +++ b/compat/have_timegm.c @@ -0,0 +1,7 @@ +#include +#include "compat.h" + +int main() +{ + return (int) timegm((struct tm *)0); +} -- cgit v1.2.3