summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-08-15 10:50:32 -0400
committerJakob Kaivo <jkk@ung.org>2020-08-15 10:50:32 -0400
commit61e983f73bd9160c5dfa5b6d4320fec86a85bbde (patch)
tree422f545a2756aeda1431741dc68ec8777d8c6d03
parente12e649d8449e7b18764381458162d80bdd80b09 (diff)
add struct to ensure space for tzname[]
-rw-r--r--mk/__time.d10
-rw-r--r--src/time/__time.c3
2 files changed, 13 insertions, 0 deletions
diff --git a/mk/__time.d b/mk/__time.d
new file mode 100644
index 00000000..3fdc33eb
--- /dev/null
+++ b/mk/__time.d
@@ -0,0 +1,10 @@
+libc_C.0: libc.a(__time.o)
+libc.a(__time.o): $(OBJDIR)/__time.o
+ @$(AR) $(ARFLAGS) $@ $(OBJDIR)/$%
+
+$(OBJDIR)/__time.o: src/time/__time.c
+$(OBJDIR)/__time.o: src/time/_time.h
+$(OBJDIR)/__time.o:
+ @echo " [CC] $@"
+ @mkdir -p $(@D)
+ @$(CC) -c -o $@ $(CFLAGS) src/time/__time.c
diff --git a/src/time/__time.c b/src/time/__time.c
new file mode 100644
index 00000000..fd72bacb
--- /dev/null
+++ b/src/time/__time.c
@@ -0,0 +1,3 @@
+#include "_time.h"
+
+struct __time __time;