Skip to contentSkip to conversation

uClibc: add patches to fix daylight saving issues

PATCH New Gustavo Zacarias 2 participants 3 messages Oct 12, 2011 – Nov 2, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 uClibc: add patches to fix daylight saving issues

---
 ....9.31.1-fix-daylight-saving-time-handling.patch |   36 ++++++++++++++++++++
 ...-0.9.32-fix-daylight-saving-time-handling.patch |   36 ++++++++++++++++++++
 2 files changed, 72 insertions(+), 0 deletions(-)
 create mode 100644 toolchain/uClibc/uClibc-0.9.31.1-fix-daylight-saving-time-handling.patch
 create mode 100644 toolchain/uClibc/uClibc-0.9.32-fix-daylight-saving-time-handling.patch
toolchain/uClibc/uClibc-0.9.31.1-fix-daylight-saving-time-handling.patch new file +36 -0
new file mode 100644
index 0000000..5a96113
@@ -0,0 +1,36 @@
+From 47f3da1cf49377c25772bb54d07db55225bbb142 Mon Sep 17 00:00:00 2001
+From: Guillaume Bourcier <[email protected]>
+Date: Tue, 11 Oct 2011 13:45:33 +0200
+Subject: [PATCH] libc: fix daylight saving time handling
+
+The algorithm computing daylight saving time incorrectly adds a day for
+each month after January for leap years. The clock shift from/to DST can
+be delayed if the last Sunday of a transition month is exactly seven
+days before the first of the following month.
+
+This change adds a day for the February month only.
+
+Signed-off-by: Guillaume Bourcier <[email protected]>
+Signed-off-by: Richard Braun <[email protected]>
+Signed-off-by: Carmelo Amoroso <[email protected]>
+Signed-off-by: Gustavo Zacarias <[email protected]>
+---
+ libc/misc/time/time.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c
+index 19d68e1..8e2ebf1 100644
+--- a/libc/misc/time/time.c
++++ b/libc/misc/time/time.c
+@@ -689,7 +689,7 @@ static int tm_isdst(register const struct tm *__restrict ptm,
+ 					++day;
+ 				}
+ 				monlen = 31 + day_cor[r->month -1] - day_cor[r->month];
+-				if (isleap && (r->month > 1)) {
++				if (isleap && (r->month == 2)) {
+ 					++monlen;
+ 				}
+ 				/* Wweekday (0 is Sunday) of 1st of the month
+-- 
+1.7.3.4
+
toolchain/uClibc/uClibc-0.9.32-fix-daylight-saving-time-handling.patch new file +36 -0
new file mode 100644
index 0000000..5a96113
@@ -0,0 +1,36 @@
+From 47f3da1cf49377c25772bb54d07db55225bbb142 Mon Sep 17 00:00:00 2001
+From: Guillaume Bourcier <[email protected]>
+Date: Tue, 11 Oct 2011 13:45:33 +0200
+Subject: [PATCH] libc: fix daylight saving time handling
+
+The algorithm computing daylight saving time incorrectly adds a day for
+each month after January for leap years. The clock shift from/to DST can
+be delayed if the last Sunday of a transition month is exactly seven
+days before the first of the following month.
+
+This change adds a day for the February month only.
+
+Signed-off-by: Guillaume Bourcier <[email protected]>
+Signed-off-by: Richard Braun <[email protected]>
+Signed-off-by: Carmelo Amoroso <[email protected]>
+Signed-off-by: Gustavo Zacarias <[email protected]>
+---
+ libc/misc/time/time.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c
+index 19d68e1..8e2ebf1 100644
+--- a/libc/misc/time/time.c
++++ b/libc/misc/time/time.c
+@@ -689,7 +689,7 @@ static int tm_isdst(register const struct tm *__restrict ptm,
+ 					++day;
+ 				}
+ 				monlen = 31 + day_cor[r->month -1] - day_cor[r->month];
+-				if (isleap && (r->month > 1)) {
++				if (isleap && (r->month == 2)) {
+ 					++monlen;
+ 				}
+ 				/* Wweekday (0 is Sunday) of 1st of the month
+-- 
+1.7.3.4
+
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 2/3 uClibc 0.9.31.1: add patch to export strverscmp for real

---
 .../uClibc/uClibc-0.9.31.1-export-strverscmp.patch |   30 ++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)
 create mode 100644 toolchain/uClibc/uClibc-0.9.31.1-export-strverscmp.patch
toolchain/uClibc/uClibc-0.9.31.1-export-strverscmp.patch new file +30 -0
new file mode 100644
index 0000000..19bc021
@@ -0,0 +1,30 @@
+From 139b8f0c673fed465d27f99c98568e5d5e1b9b72 Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <[email protected]>
+Date: Fri, 4 Jun 2010 13:36:30 +0200
+Subject: [PATCH] strverscmp: I forgot to export it
+
+Result was:
+
+strverscmp.o:
+000000ec T __GI_strverscmp
+
+i.e. no plain "strverscmp"!
+
+Signed-off-by: Denys Vlasenko <[email protected]>
+Signed-off-by: Gustavo Zacarias <[email protected]>
+---
+ libc/string/strverscmp.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/libc/string/strverscmp.c b/libc/string/strverscmp.c
+index 74ae4c6..b19e8f0 100644
+--- a/libc/string/strverscmp.c
++++ b/libc/string/strverscmp.c
+@@ -115,3 +115,4 @@ int strverscmp (const char *s1, const char *s2)
+       return state;
+   }
+ }
++libc_hidden_def(strverscmp)
+-- 
+1.7.3.4
+
Signature · 1 line
1.7.3.4