tools/coreutils: install "touch"
[openwrt/.git] / toolchain / musl / patches / 110-read_timezone_from_fs.patch
index 3ff63ac2205a723c3443d12e8a7fa1c1c3bcd161..f92781f7ed8aad3b673c60064f914adffb053899 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/time/__tz.c
 +++ b/src/time/__tz.c
-@@ -23,6 +23,9 @@ static int r0[5], r1[5];
+@@ -25,6 +25,9 @@ static int r0[5], r1[5];
  static const unsigned char *zi, *trans, *index, *types, *abbrevs, *abbrevs_end;
  static size_t map_size;
  
@@ -23,6 +23,6 @@
 +              s = tzfile = (void *)__map_file("/etc/TZ", &tzfile_size);
 +      }
 +
-       if (!s || !*s) s = "/etc/localtime";
+       if (!s) s = "/etc/localtime";
+       if (!*s) s = __utc;
  
-       if (old_tz && !strcmp(s, old_tz)) return;