summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2015-04-15 19:00:18 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-21 07:19:04 +0100
commita6e65f1889fb3e9ff4e45197c20806f96eefde9b (patch)
tree025b28c77afe66b20725a30986ecd74ebca77aa3 /meta/recipes-extended
parent7d40c6ff1d1d64ebeeffb6bfc200dcd84861214a (diff)
downloadopenembedded-core-a6e65f1889fb3e9ff4e45197c20806f96eefde9b.tar.gz
at: Remove glibc specific code
Fixes errors like | /home/kraj/work/bleeding/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/at/3.1.16-r0/at-3.1.16/parsetime.y:264: undefined reference to `__isleap' | collect2: error: ld returned 1 exit status Change-Id: Ie6ec970b12c918de640ba47e090b2f67a3a43f4e Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-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 @@
+From 7f811d9c4ebc9444e613e251c31d6bf537a24dc1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 16:35:30 -0700
+Subject: [PATCH] remove glibc assumption
+
+glibc time.h header has an undocumented __isleap macro
+that we are using anf musl is missing it.
+Since it is undocumented & does not appear
+on any other libc, stop using it and just define the macro in
+locally instead.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ parsetime.y | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/parsetime.y b/parsetime.y
+index 7005e88..324e6d3 100644
+--- a/parsetime.y
++++ b/parsetime.y
+@@ -8,6 +8,9 @@
+
+ #define YYDEBUG 1
+
++#define is_leap_year(y) \
++ ((y) % 4 == 0 && ((y) % 100 != 0 || (y) % 400 == 0))
++
+ struct tm exectm;
+ static int isgmt;
+ static int yearspec;
+@@ -217,8 +220,8 @@ date : month_name day_number
+ mnum == 12) && dnum > 31)
+ || ((mnum == 4 || mnum == 6 || mnum == 9 ||
+ mnum == 11) && dnum > 30)
+- || (mnum == 2 && dnum > 29 && __isleap(ynum+1900))
+- || (mnum == 2 && dnum > 28 && !__isleap(ynum+1900))
++ || (mnum == 2 && dnum > 29 && is_leap_year(ynum+1900))
++ || (mnum == 2 && dnum > 28 && !is_leap_year(ynum+1900))
+ )
+ {
+ yyerror("Error in day of month");
+@@ -261,8 +264,8 @@ date : month_name day_number
+ mnum == 12) && dnum > 31)
+ || ((mnum == 4 || mnum == 6 || mnum == 9 ||
+ mnum == 11) && dnum > 30)
+- || (mnum == 2 && dnum > 29 && __isleap(ynum+1900))
+- || (mnum == 2 && dnum > 28 && !__isleap(ynum+1900))
++ || (mnum == 2 && dnum > 29 && is_leap_year(ynum+1900))
++ || (mnum == 2 && dnum > 28 && !is_leap_year(ynum+1900))
+ )
+ {
+ yyerror("Error in day of month");
+--
+2.1.4
+
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 \
file://atd.service \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
file://makefile-fix-parallel.patch \
+ file://0001-remove-glibc-assumption.patch \
"
PAM_SRC_URI = "file://pam.conf.patch \