summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2024-07-23 12:01:41 -0400
committerRich Felker <dalias@aerifal.cx>2024-07-23 12:01:41 -0400
commitef7d0ae21240eac9fc1e8088112bfb0fac507578 (patch)
tree4ba521c9ddbd54be6ba485ba83d93aeb171cca06
parentdd1e63c3638d5f9afb857fccf6ce1415ca5f1b8b (diff)
downloadmusl-ef7d0ae21240eac9fc1e8088112bfb0fac507578.tar.gz
move __utc string object to its own translation unit
having it in __tz.c caused gmtime[_r] and timegm to pull in all of the time zone code despite having no need for it.
-rw-r--r--src/time/__tz.c1
-rw-r--r--src/time/__utc.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/time/__tz.c b/src/time/__tz.c
index c34b3eb7..54ed4cf6 100644
--- a/src/time/__tz.c
+++ b/src/time/__tz.c
@@ -24,7 +24,6 @@ weak_alias(__tzname, tzname);
static char std_name[TZNAME_MAX+1];
static char dst_name[TZNAME_MAX+1];
-const char __utc[] = "UTC";
static int dst_off;
static int r0[5], r1[5];
diff --git a/src/time/__utc.c b/src/time/__utc.c
new file mode 100644
index 00000000..9e8bfc58
--- /dev/null
+++ b/src/time/__utc.c
@@ -0,0 +1,3 @@
+#include "time_impl.h"
+
+const char __utc[] = "UTC";