aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2016-03-14 03:55:21 -0700
committerLev Walkin <vlm@lionet.info>2016-03-14 03:55:21 -0700
commit7623d8c33e285bc959bd23080ed42cf4869e4e18 (patch)
treecc6d03b05bc1b5993aef2c73fb817573efd53eb3
parent4ecc33785d60604974ba2c31168aa72f446bd0fc (diff)
try to fetch timegm from the environment
-rw-r--r--skeletons/GeneralizedTime.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/skeletons/GeneralizedTime.c b/skeletons/GeneralizedTime.c
index a3008aa1..7e144777 100644
--- a/skeletons/GeneralizedTime.c
+++ b/skeletons/GeneralizedTime.c
@@ -4,9 +4,9 @@
*/
#define _POSIX_PTHREAD_SEMANTICS /* for Sun */
#define _REENTRANT /* for Sun */
+#define _BSD_SOURCE /* for timegm(3) */
#include <asn_internal.h>
#include <GeneralizedTime.h>
-#include <errno.h>
#ifdef __CYGWIN__
#include "/usr/include/time.h"
@@ -14,6 +14,9 @@
#include <time.h>
#endif /* __CYGWIN__ */
+#include <stdio.h>
+#include <errno.h>
+
#if defined(_WIN32)
#pragma message( "PLEASE STOP AND READ!")
#pragma message( " localtime_r is implemented via localtime(), which may be not thread-safe.")