diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 700929154cc77..ade06bc5502fb 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -50,7 +50,11 @@ static inline long long php_date_llabs( long long i ) { return i >= 0 ? i : -i; int st = snprintf(s, len, "%lld", i); \ s[st] = '\0'; \ } while (0); -# define DATE_A64I(i, s) i = atoll(s) +# if defined(HAVE_STRTOLL) +# define DATE_A64I(i, s) i = strtoll(s, NULL, 10) +# else +# define DATE_A64I(i, s) i = strtol(s, NULL, 10) +# endif #endif /* {{{ arginfo */