diff options
Diffstat (limited to 'otherlibs/unix')
-rw-r--r-- | otherlibs/unix/gmtime.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/otherlibs/unix/gmtime.c b/otherlibs/unix/gmtime.c index 475736be9..2a75bce2c 100644 --- a/otherlibs/unix/gmtime.c +++ b/otherlibs/unix/gmtime.c @@ -75,6 +75,7 @@ value unix_mktime(value t) /* ML */ tm.tm_yday = Int_val(Field(t, 7)); tm.tm_isdst = -1; /* tm.tm_isdst = Bool_val(Field(t, 8)); */ clock = mktime(&tm); + if (clock == (time_t) -1) unix_error(ERANGE, "mktime", Nothing); tmval = alloc_tm(&tm); clkval = copy_double((double) clock); res = alloc_small(2, 0); |