summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch57
-rw-r--r--meta/recipes-extended/at/at_3.1.16.bb1
2 files changed, 58 insertions, 0 deletions
diff --git a/meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch b/meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch
new file mode 100644
index 0000000000..53ae28b5ed
--- /dev/null
+++ b/meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch
@@ -0,0 +1,57 @@
1From 7f811d9c4ebc9444e613e251c31d6bf537a24dc1 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 13 Apr 2015 16:35:30 -0700
4Subject: [PATCH] remove glibc assumption
5
6glibc time.h header has an undocumented __isleap macro
7that we are using anf musl is missing it.
8Since it is undocumented & does not appear
9on any other libc, stop using it and just define the macro in
10locally instead.
11
12Upstream-Status: Pending
13
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 parsetime.y | 11 +++++++----
17 1 file changed, 7 insertions(+), 4 deletions(-)
18
19diff --git a/parsetime.y b/parsetime.y
20index 7005e88..324e6d3 100644
21--- a/parsetime.y
22+++ b/parsetime.y
23@@ -8,6 +8,9 @@
24
25 #define YYDEBUG 1
26
27+#define is_leap_year(y) \
28+ ((y) % 4 == 0 && ((y) % 100 != 0 || (y) % 400 == 0))
29+
30 struct tm exectm;
31 static int isgmt;
32 static int yearspec;
33@@ -217,8 +220,8 @@ date : month_name day_number
34 mnum == 12) && dnum > 31)
35 || ((mnum == 4 || mnum == 6 || mnum == 9 ||
36 mnum == 11) && dnum > 30)
37- || (mnum == 2 && dnum > 29 && __isleap(ynum+1900))
38- || (mnum == 2 && dnum > 28 && !__isleap(ynum+1900))
39+ || (mnum == 2 && dnum > 29 && is_leap_year(ynum+1900))
40+ || (mnum == 2 && dnum > 28 && !is_leap_year(ynum+1900))
41 )
42 {
43 yyerror("Error in day of month");
44@@ -261,8 +264,8 @@ date : month_name day_number
45 mnum == 12) && dnum > 31)
46 || ((mnum == 4 || mnum == 6 || mnum == 9 ||
47 mnum == 11) && dnum > 30)
48- || (mnum == 2 && dnum > 29 && __isleap(ynum+1900))
49- || (mnum == 2 && dnum > 28 && !__isleap(ynum+1900))
50+ || (mnum == 2 && dnum > 29 && is_leap_year(ynum+1900))
51+ || (mnum == 2 && dnum > 28 && !is_leap_year(ynum+1900))
52 )
53 {
54 yyerror("Error in day of month");
55--
562.1.4
57
diff --git a/meta/recipes-extended/at/at_3.1.16.bb b/meta/recipes-extended/at/at_3.1.16.bb
index cee9fde967..0512bcb836 100644
--- a/meta/recipes-extended/at/at_3.1.16.bb
+++ b/meta/recipes-extended/at/at_3.1.16.bb
@@ -24,6 +24,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz \
24 file://atd.service \ 24 file://atd.service \
25 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ 25 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
26 file://makefile-fix-parallel.patch \ 26 file://makefile-fix-parallel.patch \
27 file://0001-remove-glibc-assumption.patch \
27 " 28 "
28 29
29PAM_SRC_URI = "file://pam.conf.patch \ 30PAM_SRC_URI = "file://pam.conf.patch \