diff options
Diffstat (limited to 'src/http/ngx_http_parse_time.c')
-rw-r--r-- | src/http/ngx_http_parse_time.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/http/ngx_http_parse_time.c b/src/http/ngx_http_parse_time.c index da9797177..549873762 100644 --- a/src/http/ngx_http_parse_time.c +++ b/src/http/ngx_http_parse_time.c @@ -229,10 +229,14 @@ time_t ngx_http_parse_time(u_char *value, size_t len) return NGX_ERROR; } - if (sizeof(time_t) <= 4 && year >= 2038) { +#if (NGX_TIME_T_SIZE <= 4) + + if (year >= 2038) { return NGX_ERROR; } +#endif + /* * shift new year to March 1 and start months from 1 (not 0), * it is needed for Gauss's formula |