diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-07-17 10:39:11 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-07-17 10:39:11 -0400 |
commit | ea81c0624f0213430ae8fb959e30373eeaaf391c (patch) | |
tree | 465459ee633ceb927202de641a77f5adbfa31999 /src/time/timegm.c | |
parent | ac1bf93fc634274c14d234c44b2e846a93a5cc95 (diff) | |
download | musl-ea81c0624f0213430ae8fb959e30373eeaaf391c.tar.gz musl-ea81c0624f0213430ae8fb959e30373eeaaf391c.tar.bz2 musl-ea81c0624f0213430ae8fb959e30373eeaaf391c.tar.xz musl-ea81c0624f0213430ae8fb959e30373eeaaf391c.zip |
fix error code on time conversion overflows
POSIX mandates EOVERFLOW for this condition.
Diffstat (limited to 'src/time/timegm.c')
-rw-r--r-- | src/time/timegm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/time/timegm.c b/src/time/timegm.c index 7148fca3..e7a7939b 100644 --- a/src/time/timegm.c +++ b/src/time/timegm.c @@ -7,7 +7,7 @@ time_t timegm(struct tm *tm) struct tm new; long long t = __tm_to_secs(tm); if (__secs_to_tm(t, &new) < 0) { - errno = EINVAL; + errno = EOVERFLOW; return -1; } *tm = new; |