]> TLD Linux GIT Repositories - packages/php.git/blobdiff - php-systzdata.patch
- up to 8.0.10
[packages/php.git] / php-systzdata.patch
index 902d3cee75fef7f2eadc7f69a9edb2ba95fe4ee3..4bf7be9e18ae94926f1eb088599a315986683e53 100644 (file)
@@ -602,22 +602,6 @@ diff -up php-8.0.0beta3/ext/date/lib/parse_tz.c.systzdata php-8.0.0beta3/ext/dat
  }
  
  static int skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
-@@ -500,12 +1002,14 @@ static timelib_tzinfo* timelib_tzinfo_ct
- timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *tzdb, int *error_code)
- {
-       const unsigned char *tzf;
-+      char *memmap = NULL;
-+      size_t maplen;
-       timelib_tzinfo *tmp;
-       int version;
-       int transitions_result, types_result;
-       unsigned int type; /* TIMELIB_TZINFO_PHP or TIMELIB_TZINFO_ZONEINFO */
--      if (seek_to_tz_position(&tzf, timezone, tzdb)) {
-+      if (seek_to_tz_position(&tzf, timezone, &memmap, &maplen, tzdb)) {
-               tmp = timelib_tzinfo_ctor(timezone);
-               version = read_preamble(&tzf, tmp, &type);
 @@ -540,11 +1044,36 @@ timelib_tzinfo *timelib_parse_tzfile(con
                }
                skip_posix_string(&tzf, tmp);
@@ -655,3 +639,23 @@ diff -up php-8.0.0beta3/ext/date/lib/parse_tz.c.systzdata php-8.0.0beta3/ext/dat
        } else {
                *error_code = TIMELIB_ERROR_NO_SUCH_TIMEZONE;
                tmp = NULL;
+--- php-8.0.10/ext/date/lib/parse_tz.c.orig    2021-08-27 14:25:14.033549324 +0200
++++ php-8.0.10/ext/date/lib/parse_tz.c 2021-08-27 14:24:27.173547016 +0200
+@@ -1019,6 +1019,8 @@
+ timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *tzdb, int *error_code)
+ {
+       const unsigned char *tzf;
++      char *memmap = NULL;
++      size_t maplen;
+       timelib_tzinfo *tmp;
+       int version;
+       int transitions_result, types_result;
+@@ -1026,7 +1028,7 @@
+       *error_code = TIMELIB_ERROR_NO_ERROR;
+-      if (seek_to_tz_position(&tzf, timezone, tzdb)) {
++      if (seek_to_tz_position(&tzf, timezone, &memmap, &maplen, tzdb)) {
+               tmp = timelib_tzinfo_ctor(timezone);
+               version = read_preamble(&tzf, tmp, &type);