aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/musl/patches/036-fix-strftime-y-for-negative-tm_year.patch
diff options
context:
space:
mode:
authorKoen Vandeputte <koen.vandeputte@ncentric.com>2016-12-22 17:17:04 +0100
committerFelix Fietkau <nbd@nbd.name>2016-12-26 11:17:33 +0100
commit2912f9f2a2e5997df069d38e20d85ff4cc51acef (patch)
tree783e8cd472936ac1ca9378f16fb3189a486e7a48 /toolchain/musl/patches/036-fix-strftime-y-for-negative-tm_year.patch
parentb97c933ffb5aae338351a1db12a3f7cf5234f5c7 (diff)
downloadupstream-2912f9f2a2e5997df069d38e20d85ff4cc51acef.tar.gz
upstream-2912f9f2a2e5997df069d38e20d85ff4cc51acef.tar.bz2
upstream-2912f9f2a2e5997df069d38e20d85ff4cc51acef.zip
musl: backport various post-1.1.15 fixes
Backport most important fixes up to latest HEAD - Taken post-commit reverts/fixes into account Compile tested Run-tested on cns3xxx & imx6 targets Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Diffstat (limited to 'toolchain/musl/patches/036-fix-strftime-y-for-negative-tm_year.patch')
-rw-r--r--toolchain/musl/patches/036-fix-strftime-y-for-negative-tm_year.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/toolchain/musl/patches/036-fix-strftime-y-for-negative-tm_year.patch b/toolchain/musl/patches/036-fix-strftime-y-for-negative-tm_year.patch
new file mode 100644
index 0000000000..1f7ad5b8e1
--- /dev/null
+++ b/toolchain/musl/patches/036-fix-strftime-y-for-negative-tm_year.patch
@@ -0,0 +1,23 @@
+From 583ea83541dcc6481c7a1bd1a9b485526bad84a1 Mon Sep 17 00:00:00 2001
+From: Szabolcs Nagy <nsz@port70.net>
+Date: Tue, 4 Oct 2016 17:14:57 +0000
+Subject: fix strftime %y for negative tm_year
+
+---
+ src/time/strftime.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/time/strftime.c b/src/time/strftime.c
+index f1ccc4d..e103e02 100644
+--- a/src/time/strftime.c
++++ b/src/time/strftime.c
+@@ -167,6 +167,7 @@ const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *
+ goto nl_strftime;
+ case 'y':
+ val = tm->tm_year % 100;
++ if (val<0) val += 100;
+ goto number;
+ case 'Y':
+ val = tm->tm_year + 1900LL;
+--
+cgit v0.11.2