diff --git a/lib/asn1/der_get.c b/lib/asn1/der_get.c index f4d377789..022d705c1 100644 --- a/lib/asn1/der_get.c +++ b/lib/asn1/der_get.c @@ -289,6 +289,10 @@ der_get_heim_integer (const unsigned char *p, size_t len, return 0; } +#ifndef HAVE_TIMEGM +#define timegm(x) _der_timegm(x) +#endif + static int generalizedtime2time (const char *s, time_t *t) { @@ -312,6 +316,7 @@ generalizedtime2time (const char *s, time_t *t) *t = timegm (&tm); return 0; } +#undef timegm static int der_get_time (const unsigned char *p, size_t len, diff --git a/lib/asn1/timegm.c b/lib/asn1/timegm.c index b4c39927d..c6b19e283 100644 --- a/lib/asn1/timegm.c +++ b/lib/asn1/timegm.c @@ -45,7 +45,7 @@ is_leap(unsigned y) } time_t -timegm (struct tm *tm) +_der_timegm (struct tm *tm) { static const unsigned ndays[2][12] ={ {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},