* [PATCH 01/10] at: Remove glibc specific code
2015-04-16 1:59 [PATCH 00/10] More musl fixes Khem Raj
@ 2015-04-16 2:00 ` Khem Raj
2015-04-16 2:00 ` [PATCH 02/10] coreutils: Add code to consider musl when selecting charsets Khem Raj
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Khem Raj @ 2015-04-16 2:00 UTC (permalink / raw)
To: openembedded-core
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>
---
.../at/at/0001-remove-glibc-assumption.patch | 57 ++++++++++++++++++++++
meta/recipes-extended/at/at_3.1.16.bb | 1 +
2 files changed, 58 insertions(+)
create mode 100644 meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch
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 0000000..53ae28b
--- /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 cee9fde..0512bcb 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 \
--
2.1.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 02/10] coreutils: Add code to consider musl when selecting charsets
2015-04-16 1:59 [PATCH 00/10] More musl fixes Khem Raj
2015-04-16 2:00 ` [PATCH 01/10] at: Remove glibc specific code Khem Raj
@ 2015-04-16 2:00 ` Khem Raj
2015-04-16 2:00 ` [PATCH 03/10] openssh: Upgrade 6.7 - > 6.8 Khem Raj
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Khem Raj @ 2015-04-16 2:00 UTC (permalink / raw)
To: openembedded-core
The real issue is in gnulib where it should be fixed
but gnulib gets imported in source into various components
and that may take a while. So lets fix the componnets versions
and as/if they land in new gnulib with a fix we can take
it off.
Change-Id: I63bbcb7bc4d92cb1ec74bb4f4f5109a377060253
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...need_charset_alias-when-building-for-musl.patch | 33 ++++++++++++++++++++++
meta/recipes-core/coreutils/coreutils_8.23.bb | 1 +
2 files changed, 34 insertions(+)
create mode 100644 meta/recipes-core/coreutils/coreutils-8.23/0001-Unset-need_charset_alias-when-building-for-musl.patch
diff --git a/meta/recipes-core/coreutils/coreutils-8.23/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-core/coreutils/coreutils-8.23/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..abdfa2a
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-8.23/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,33 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Not Required
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/gnulib.mk b/lib/gnulib.mk
+index e1d74db..c0e92dd 100644
+--- a/lib/gnulib.mk
++++ b/lib/gnulib.mk
+@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
+--
+2.1.4
+
diff --git a/meta/recipes-core/coreutils/coreutils_8.23.bb b/meta/recipes-core/coreutils/coreutils_8.23.bb
index 63df75e..70c04a5 100644
--- a/meta/recipes-core/coreutils/coreutils_8.23.bb
+++ b/meta/recipes-core/coreutils/coreutils_8.23.bb
@@ -17,6 +17,7 @@ SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz;name=tarball \
file://man-decouple-manpages-from-build.patch \
file://remove-usr-local-lib-from-m4.patch \
file://fix-selinux-flask.patch \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
"
SRC_URI[tarball.md5sum] = "abed135279f87ad6762ce57ff6d89c41"
--
2.1.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 03/10] openssh: Upgrade 6.7 - > 6.8
2015-04-16 1:59 [PATCH 00/10] More musl fixes Khem Raj
2015-04-16 2:00 ` [PATCH 01/10] at: Remove glibc specific code Khem Raj
2015-04-16 2:00 ` [PATCH 02/10] coreutils: Add code to consider musl when selecting charsets Khem Raj
@ 2015-04-16 2:00 ` Khem Raj
2015-04-16 2:00 ` [PATCH 04/10] dosfstools: Fix build with musl Khem Raj
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Khem Raj @ 2015-04-16 2:00 UTC (permalink / raw)
To: openembedded-core
Its a major releaseof openssh, should be fully
compatible with 6.7 additionally works with musl
Change-Id: I903d31247b8a318b9be1c21f764ffe56b5971ca9
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../openssh/add-test-support-for-busybox.patch | 38 +++++++++++++---------
.../openssh/{openssh_6.7p1.bb => openssh_6.8p1.bb} | 4 +--
2 files changed, 25 insertions(+), 17 deletions(-)
rename meta/recipes-connectivity/openssh/{openssh_6.7p1.bb => openssh_6.8p1.bb} (97%)
diff --git a/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch b/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch
index 07af667..adc25c6 100644
--- a/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch
+++ b/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch
@@ -6,10 +6,12 @@ Adjust test cases to work with busybox.
Signed-off-by: Maxin B. John <maxin.john@enea.com>
Upstream-Status: Pending
---- a/regress/cipher-speed.sh 2012-06-30 07:08:53.000000000 +0200
-+++ b/regress/cipher-speed.sh 2013-02-15 11:30:20.670022055 +0100
-@@ -26,7 +26,7 @@
- echon "$c/$m:\t"
+Index: openssh-6.8p1/regress/cipher-speed.sh
+===================================================================
+--- openssh-6.8p1.orig/regress/cipher-speed.sh
++++ openssh-6.8p1/regress/cipher-speed.sh
+@@ -17,7 +17,7 @@ for c in `${SSH} -Q cipher`; do n=0; for
+ printf "%-60s" "$c/$m:"
( ${SSH} -o 'compression no' \
-F $OBJ/ssh_proxy -2 -m $m -c $c somehost \
- exec sh -c \'"dd of=/dev/null obs=32k"\' \
@@ -17,8 +19,8 @@ Upstream-Status: Pending
< ${DATA} ) 2>&1 | getbytes
if [ $? -ne 0 ]; then
-@@ -42,7 +42,7 @@
- echon "$c:\t"
+@@ -42,7 +42,7 @@ for c in $ciphers; do
+ printf "%-60s" "$c:"
( ${SSH} -o 'compression no' \
-F $OBJ/ssh_proxy -1 -c $c somehost \
- exec sh -c \'"dd of=/dev/null obs=32k"\' \
@@ -26,9 +28,11 @@ Upstream-Status: Pending
< ${DATA} ) 2>&1 | getbytes
if [ $? -ne 0 ]; then
fail "ssh -1 failed with cipher $c"
---- a/regress/transfer.sh 2003-09-04 06:54:40.000000000 +0200
-+++ b/regress/transfer.sh 2013-02-15 11:25:34.666411185 +0100
-@@ -18,7 +18,7 @@
+Index: openssh-6.8p1/regress/transfer.sh
+===================================================================
+--- openssh-6.8p1.orig/regress/transfer.sh
++++ openssh-6.8p1/regress/transfer.sh
+@@ -15,7 +15,7 @@ for p in ${SSH_PROTOCOLS}; do
for s in 10 100 1k 32k 64k 128k 256k; do
trace "proto $p dd-size ${s}"
rm -f ${COPY}
@@ -37,20 +41,24 @@ Upstream-Status: Pending
${SSH} -q -$p -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
if [ $? -ne 0 ]; then
fail "ssh cat $DATA failed"
---- a/regress/yes-head.sh 2005-11-28 06:41:03.000000000 +0100
-+++ b/regress/yes-head.sh 2013-02-15 11:55:11.413715068 +0100
+Index: openssh-6.8p1/regress/yes-head.sh
+===================================================================
+--- openssh-6.8p1.orig/regress/yes-head.sh
++++ openssh-6.8p1/regress/yes-head.sh
@@ -4,7 +4,7 @@
tid="yes pipe head"
- for p in 1 2; do
+ for p in ${SSH_PROTOCOLS}; do
- lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -2000"' | (sleep 3 ; wc -l)`
+ lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -n 2000"' | (sleep 3 ; wc -l)`
if [ $? -ne 0 ]; then
fail "yes|head test failed"
lines = 0;
---- a/regress/key-options.sh 2008-07-04 09:08:58.000000000 +0200
-+++ b/regress/key-options.sh 2013-02-15 12:06:05.109486098 +0100
-@@ -54,7 +54,7 @@
+Index: openssh-6.8p1/regress/key-options.sh
+===================================================================
+--- openssh-6.8p1.orig/regress/key-options.sh
++++ openssh-6.8p1/regress/key-options.sh
+@@ -54,7 +54,7 @@ for p in ${SSH_PROTOCOLS}; do
fi
sed 's/.*/from="'"$f"'" &/' $origkeys >$authkeys
diff --git a/meta/recipes-connectivity/openssh/openssh_6.7p1.bb b/meta/recipes-connectivity/openssh/openssh_6.8p1.bb
similarity index 97%
rename from meta/recipes-connectivity/openssh/openssh_6.7p1.bb
rename to meta/recipes-connectivity/openssh/openssh_6.8p1.bb
index a272629..8e07e00 100644
--- a/meta/recipes-connectivity/openssh/openssh_6.7p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_6.8p1.bb
@@ -25,8 +25,8 @@ SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.
PAM_SRC_URI = "file://sshd"
-SRC_URI[md5sum] = "3246aa79317b1d23cae783a3bf8275d6"
-SRC_URI[sha256sum] = "b2f8394eae858dabbdef7dac10b99aec00c95462753e80342e530bbb6f725507"
+SRC_URI[md5sum] = "08f72de6751acfbd0892b5f003922701"
+SRC_URI[sha256sum] = "3ff64ce73ee124480b5bf767b9830d7d3c03bbcb6abe716b78f0192c37ce160e"
inherit useradd update-rc.d update-alternatives systemd
--
2.1.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 04/10] dosfstools: Fix build with musl
2015-04-16 1:59 [PATCH 00/10] More musl fixes Khem Raj
` (2 preceding siblings ...)
2015-04-16 2:00 ` [PATCH 03/10] openssh: Upgrade 6.7 - > 6.8 Khem Raj
@ 2015-04-16 2:00 ` Khem Raj
2015-04-16 2:00 ` [PATCH 05/10] distcc:Include missing fcntl.h in zeroconf Khem Raj
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Khem Raj @ 2015-04-16 2:00 UTC (permalink / raw)
To: openembedded-core
We need to pass _GNU_SOURCE and include fcntl.h
Change-Id: Ice0597ddac3b275400880d85793ece4b300bec9b
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...ude-fcntl.h-for-getting-loff_t-definition.patch | 41 ++++++++++++++++++++++
.../recipes-devtools/dosfstools/dosfstools_2.11.bb | 5 ++-
2 files changed, 45 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-devtools/dosfstools/dosfstools/0001-Include-fcntl.h-for-getting-loff_t-definition.patch
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/0001-Include-fcntl.h-for-getting-loff_t-definition.patch b/meta/recipes-devtools/dosfstools/dosfstools/0001-Include-fcntl.h-for-getting-loff_t-definition.patch
new file mode 100644
index 0000000..06f5b7a
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/0001-Include-fcntl.h-for-getting-loff_t-definition.patch
@@ -0,0 +1,41 @@
+From b7c42c6a9829bea911b22201edd7df2a9bec1a14 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:52:34 -0700
+Subject: [PATCH] Include fcntl.h for getting loff_t definition
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ dosfsck/dosfsck.h | 2 ++
+ dosfsck/lfn.c | 1 +
+ 2 files changed, 3 insertions(+)
+
+diff --git a/dosfsck/dosfsck.h b/dosfsck/dosfsck.h
+index d9314b1..2076d5f 100644
+--- a/dosfsck/dosfsck.h
++++ b/dosfsck/dosfsck.h
+@@ -50,6 +50,8 @@
+ #define CT_LE_L(v) (v)
+ #endif /* __BIG_ENDIAN */
+
++#include <fcntl.h>
++
+ #define VFAT_LN_ATTR (ATTR_RO | ATTR_HIDDEN | ATTR_SYS | ATTR_VOLUME)
+
+ /* ++roman: Use own definition of boot sector structure -- the kernel headers'
+diff --git a/dosfsck/lfn.c b/dosfsck/lfn.c
+index 9b2cfc3..bb04fda 100644
+--- a/dosfsck/lfn.c
++++ b/dosfsck/lfn.c
+@@ -7,6 +7,7 @@
+ #include <string.h>
+ #include <limits.h>
+ #include <time.h>
++#include <fcntl.h>
+
+ #include "common.h"
+ #include "io.h"
+--
+2.1.4
+
diff --git a/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb b/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
index d1c24b8..beec488 100644
--- a/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
+++ b/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
@@ -17,7 +17,9 @@ SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.src.tar.gz/407d4
file://dosfstools-msdos_fs-types.patch \
file://include-linux-types.patch \
file://nofat32_autoselect.patch \
- file://fix_populated_dosfs_creation.patch "
+ file://fix_populated_dosfs_creation.patch \
+ file://0001-Include-fcntl.h-for-getting-loff_t-definition.patch \
+ "
SRC_URI[md5sum] = "407d405ade410f7597d364ab5dc8c9f6"
SRC_URI[sha256sum] = "0eac6d12388b3d9ed78684529c1b0d9346fa2abbe406c4d4a3eb5a023c98a484"
@@ -26,6 +28,7 @@ SRC_URI[sha256sum] = "0eac6d12388b3d9ed78684529c1b0d9346fa2abbe406c4d4a3eb5a023c
# add this in here to for sure allow for big files.
#
CFLAGS_append = " -D_FILE_OFFSET_BITS=64"
+CFLAGS_append_libc-musl = " -D_GNU_SOURCE"
do_install () {
oe_runmake "PREFIX=${D}" "SBINDIR=${D}${base_sbindir}" \
--
2.1.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 05/10] distcc:Include missing fcntl.h in zeroconf
2015-04-16 1:59 [PATCH 00/10] More musl fixes Khem Raj
` (3 preceding siblings ...)
2015-04-16 2:00 ` [PATCH 04/10] dosfstools: Fix build with musl Khem Raj
@ 2015-04-16 2:00 ` Khem Raj
2015-04-16 2:00 ` [PATCH 06/10] parted: Add patches to fix build on musl Khem Raj
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Khem Raj @ 2015-04-16 2:00 UTC (permalink / raw)
To: openembedded-core
This is exposed by musl
Change-Id: I39ea3a66135d33ed0a9abbd94d3c0f39120e3586
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-devtools/distcc/distcc_3.1.bb | 1 +
.../files/0001-zeroconf-Include-fcntl.h.patch | 29 ++++++++++++++++++++++
2 files changed, 30 insertions(+)
create mode 100644 meta/recipes-devtools/distcc/files/0001-zeroconf-Include-fcntl.h.patch
diff --git a/meta/recipes-devtools/distcc/distcc_3.1.bb b/meta/recipes-devtools/distcc/distcc_3.1.bb
index ad0e94f..e4b9313 100644
--- a/meta/recipes-devtools/distcc/distcc_3.1.bb
+++ b/meta/recipes-devtools/distcc/distcc_3.1.bb
@@ -19,6 +19,7 @@ RRECOMMENDS_${PN} = "avahi-daemon"
SRC_URI = "http://distcc.googlecode.com/files/${BPN}-${PV}.tar.bz2 \
file://separatebuilddir.patch \
+ file://0001-zeroconf-Include-fcntl.h.patch \
file://default \
file://distccmon-gnome.desktop \
file://distcc \
diff --git a/meta/recipes-devtools/distcc/files/0001-zeroconf-Include-fcntl.h.patch b/meta/recipes-devtools/distcc/files/0001-zeroconf-Include-fcntl.h.patch
new file mode 100644
index 0000000..b17ec9c
--- /dev/null
+++ b/meta/recipes-devtools/distcc/files/0001-zeroconf-Include-fcntl.h.patch
@@ -0,0 +1,29 @@
+From 8331fc4759d809512f404e7a27f817ad6d616450 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 18:00:33 -0700
+Subject: [PATCH] zeroconf: Include fcntl.h
+
+We need it for getting deinitions for O_* e.g. O_CREAT
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/zeroconf.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/zeroconf.c b/src/zeroconf.c
+index 414ddc4..31bd33f 100644
+--- a/src/zeroconf.c
++++ b/src/zeroconf.c
+@@ -33,6 +33,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <limits.h>
++#include <fcntl.h>
+
+ #include <avahi-common/domain.h>
+ #include <avahi-common/error.h>
+--
+2.1.4
+
--
2.1.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 06/10] parted: Add patches to fix build on musl
2015-04-16 1:59 [PATCH 00/10] More musl fixes Khem Raj
` (4 preceding siblings ...)
2015-04-16 2:00 ` [PATCH 05/10] distcc:Include missing fcntl.h in zeroconf Khem Raj
@ 2015-04-16 2:00 ` Khem Raj
2015-04-16 2:00 ` [PATCH 07/10] libnfsidmap: Include sys/types.h for u_int32_t Khem Raj
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Khem Raj @ 2015-04-16 2:00 UTC (permalink / raw)
To: openembedded-core
Theese patches are actually generic but expose issues
when compiling on musl
Change-Id: Ib5312af280d2c399334c5645fbea215737933ae5
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../0001-Include-fcntl.h-in-platform_defs.h.patch | 29 +++++++++++++++++++
...need_charset_alias-when-building-for-musl.patch | 33 ++++++++++++++++++++++
meta/recipes-extended/parted/parted_3.2.bb | 2 ++
3 files changed, 64 insertions(+)
create mode 100644 meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch
create mode 100644 meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch
diff --git a/meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch b/meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch
new file mode 100644
index 0000000..b0376ce
--- /dev/null
+++ b/meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch
@@ -0,0 +1,29 @@
+From d78dd087c4ec4715aab5fe115668e726046ecd76 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 18:16:05 -0700
+Subject: [PATCH] Include fcntl.h in /platform_defs.h
+
+exposed when compiling using musl
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libparted/fs/xfs/platform_defs.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libparted/fs/xfs/platform_defs.h b/libparted/fs/xfs/platform_defs.h
+index 2b55752..32bd3d3 100644
+--- a/libparted/fs/xfs/platform_defs.h
++++ b/libparted/fs/xfs/platform_defs.h
+@@ -42,6 +42,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
++#include <fcntl.h>
+ #include <sys/param.h>
+ #include <sys/types.h>
+
+--
+2.1.4
+
diff --git a/meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..abdfa2a
--- /dev/null
+++ b/meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,33 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Not Required
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/gnulib.mk b/lib/gnulib.mk
+index e1d74db..c0e92dd 100644
+--- a/lib/gnulib.mk
++++ b/lib/gnulib.mk
+@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
+--
+2.1.4
+
diff --git a/meta/recipes-extended/parted/parted_3.2.bb b/meta/recipes-extended/parted/parted_3.2.bb
index e225769..5d34749 100644
--- a/meta/recipes-extended/parted/parted_3.2.bb
+++ b/meta/recipes-extended/parted/parted_3.2.bb
@@ -11,6 +11,8 @@ SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \
file://syscalls.patch \
file://fix-doc-mandir.patch \
file://fix-compile-failure-while-dis.patch \
+ file://0001-Include-fcntl.h-in-platform_defs.h.patch \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
file://run-ptest \
file://Makefile \
"
--
2.1.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 07/10] libnfsidmap: Include sys/types.h for u_int32_t
2015-04-16 1:59 [PATCH 00/10] More musl fixes Khem Raj
` (5 preceding siblings ...)
2015-04-16 2:00 ` [PATCH 06/10] parted: Add patches to fix build on musl Khem Raj
@ 2015-04-16 2:00 ` Khem Raj
2015-04-16 2:00 ` [PATCH 08/10] recipes: Fix charset.alias for musl Khem Raj
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Khem Raj @ 2015-04-16 2:00 UTC (permalink / raw)
To: openembedded-core
Exposed using musl
Change-Id: Ia155850b3dfe62cd7d10b207b94ff3cc1f0244fc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...clude-sys-types.h-for-getting-u_-typedefs.patch | 27 ++++++++++++++++++++++
.../Set_nobody_user_group.patch | 0
.../{files => libnfsidmap}/fix-ac-prereq.patch | 0
.../nfs-utils/libnfsidmap_0.25.bb | 1 +
4 files changed, 28 insertions(+)
create mode 100644 meta/recipes-connectivity/nfs-utils/libnfsidmap/0001-include-sys-types.h-for-getting-u_-typedefs.patch
rename meta/recipes-connectivity/nfs-utils/{files => libnfsidmap}/Set_nobody_user_group.patch (100%)
rename meta/recipes-connectivity/nfs-utils/{files => libnfsidmap}/fix-ac-prereq.patch (100%)
diff --git a/meta/recipes-connectivity/nfs-utils/libnfsidmap/0001-include-sys-types.h-for-getting-u_-typedefs.patch b/meta/recipes-connectivity/nfs-utils/libnfsidmap/0001-include-sys-types.h-for-getting-u_-typedefs.patch
new file mode 100644
index 0000000..4ac5290
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/libnfsidmap/0001-include-sys-types.h-for-getting-u_-typedefs.patch
@@ -0,0 +1,27 @@
+From a5e95a42e7bceddc9ecad06694c1a0588f4bafc8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 14 Apr 2015 07:22:47 -0700
+Subject: [PATCH] include sys/types.h for getting u_* typedefs
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ cfg.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/cfg.h b/cfg.h
+index d4d4cab..fe49e8f 100644
+--- a/cfg.h
++++ b/cfg.h
+@@ -33,6 +33,7 @@
+ #ifndef _CONF_H_
+ #define _CONF_H_
+
++#include <sys/types.h>
+ #include "queue.h"
+
+ struct conf_list_node {
+--
+2.1.4
+
diff --git a/meta/recipes-connectivity/nfs-utils/files/Set_nobody_user_group.patch b/meta/recipes-connectivity/nfs-utils/libnfsidmap/Set_nobody_user_group.patch
similarity index 100%
rename from meta/recipes-connectivity/nfs-utils/files/Set_nobody_user_group.patch
rename to meta/recipes-connectivity/nfs-utils/libnfsidmap/Set_nobody_user_group.patch
diff --git a/meta/recipes-connectivity/nfs-utils/files/fix-ac-prereq.patch b/meta/recipes-connectivity/nfs-utils/libnfsidmap/fix-ac-prereq.patch
similarity index 100%
rename from meta/recipes-connectivity/nfs-utils/files/fix-ac-prereq.patch
rename to meta/recipes-connectivity/nfs-utils/libnfsidmap/fix-ac-prereq.patch
diff --git a/meta/recipes-connectivity/nfs-utils/libnfsidmap_0.25.bb b/meta/recipes-connectivity/nfs-utils/libnfsidmap_0.25.bb
index fcc9e87..5b578e9 100644
--- a/meta/recipes-connectivity/nfs-utils/libnfsidmap_0.25.bb
+++ b/meta/recipes-connectivity/nfs-utils/libnfsidmap_0.25.bb
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d9c6a2a0ca6017fda7cd905ed2739b37"
SRC_URI = "http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/${BPN}-${PV}.tar.gz \
file://fix-ac-prereq.patch \
file://Set_nobody_user_group.patch \
+ file://0001-include-sys-types.h-for-getting-u_-typedefs.patch \
"
SRC_URI[md5sum] = "2ac4893c92716add1a1447ae01df77ab"
--
2.1.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 08/10] recipes: Fix charset.alias for musl
2015-04-16 1:59 [PATCH 00/10] More musl fixes Khem Raj
` (6 preceding siblings ...)
2015-04-16 2:00 ` [PATCH 07/10] libnfsidmap: Include sys/types.h for u_int32_t Khem Raj
@ 2015-04-16 2:00 ` Khem Raj
2015-04-16 2:00 ` [PATCH 09/10] mtd-utils: update to latest and fix static inlining Khem Raj
2015-04-16 2:00 ` [PATCH 10/10] connman: Fix builds to compile on musl Khem Raj
9 siblings, 0 replies; 11+ messages in thread
From: Khem Raj @ 2015-04-16 2:00 UTC (permalink / raw)
To: openembedded-core
This is same gnulib fix replicated across needed recipes
Change-Id: I756713407111a726eae98e26c9c1ff64981371c0
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...need_charset_alias-when-building-for-musl.patch | 30 ++++++++++++++++++++
meta/recipes-bsp/grub/grub2.inc | 1 +
...need_charset_alias-when-building-for-musl.patch | 33 ++++++++++++++++++++++
meta/recipes-devtools/bison/bison_2.7.1.bb | 1 +
meta/recipes-devtools/m4/m4-1.4.17.inc | 3 ++
...need_charset_alias-when-building-for-musl.patch | 33 ++++++++++++++++++++++
...need_charset_alias-when-building-for-musl.patch | 33 ++++++++++++++++++++++
meta/recipes-devtools/patch/patch_2.7.5.bb | 4 ++-
meta/recipes-extended/augeas/augeas.inc | 1 +
...need_charset_alias-when-building-for-musl.patch | 30 ++++++++++++++++++++
...need_charset_alias-when-building-for-musl.patch | 30 ++++++++++++++++++++
meta/recipes-extended/cpio/cpio_2.11.bb | 3 +-
...need_charset_alias-when-building-for-musl.patch | 33 ++++++++++++++++++++++
meta/recipes-extended/diffutils/diffutils_3.3.bb | 1 +
...need_charset_alias-when-building-for-musl.patch | 30 ++++++++++++++++++++
.../recipes-extended/findutils/findutils_4.5.14.bb | 2 ++
...need_charset_alias-when-building-for-musl.patch | 33 ++++++++++++++++++++++
meta/recipes-extended/grep/grep_2.21.bb | 4 ++-
...need_charset_alias-when-building-for-musl.patch | 30 ++++++++++++++++++++
meta/recipes-extended/groff/groff_1.22.3.bb | 8 ++++--
...need_charset_alias-when-building-for-musl.patch | 33 ++++++++++++++++++++++
meta/recipes-extended/sed/sed_4.2.2.bb | 1 +
...need_charset_alias-when-building-for-musl.patch | 30 ++++++++++++++++++++
meta/recipes-extended/texinfo/texinfo_5.2.bb | 3 +-
...need_charset_alias-when-building-for-musl.patch | 30 ++++++++++++++++++++
meta/recipes-extended/wget/wget_1.16.3.bb | 1 +
...need_charset_alias-when-building-for-musl.patch | 30 ++++++++++++++++++++
.../libunistring/libunistring_0.9.4.bb | 1 +
28 files changed, 465 insertions(+), 7 deletions(-)
create mode 100644 meta/recipes-bsp/grub/files/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-devtools/bison/bison/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-devtools/m4/m4/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-devtools/patch/patch/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-extended/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-extended/cpio/cpio-2.11/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-extended/diffutils/diffutils-3.3/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-extended/grep/grep/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-extended/texinfo/texinfo/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-extended/wget/wget/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-support/libunistring/libunistring/0001-Unset-need_charset_alias-when-building-for-musl.patch
diff --git a/meta/recipes-bsp/grub/files/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-bsp/grub/files/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..3706e6b
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,30 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Not Required
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: grub-2.00/grub-core/gnulib/Makefile.am
+===================================================================
+--- grub-2.00.orig/grub-core/gnulib/Makefile.am
++++ grub-2.00/grub-core/gnulib/Makefile.am
+@@ -410,7 +410,7 @@ install-exec-localcharset: all-local
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index 4d9e3c7..08c0b6b 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -24,6 +24,7 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
file://grub-no-unused-result.patch \
file://grub-efi-allow-a-compilation-without-mcmodel-large.patch \
file://grub-efi-fix-with-glibc-2.20.patch \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
"
DEPENDS = "flex-native bison-native xz"
diff --git a/meta/recipes-devtools/bison/bison/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-devtools/bison/bison/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..abdfa2a
--- /dev/null
+++ b/meta/recipes-devtools/bison/bison/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,33 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Not Required
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/gnulib.mk b/lib/gnulib.mk
+index e1d74db..c0e92dd 100644
+--- a/lib/gnulib.mk
++++ b/lib/gnulib.mk
+@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
+--
+2.1.4
+
diff --git a/meta/recipes-devtools/bison/bison_2.7.1.bb b/meta/recipes-devtools/bison/bison_2.7.1.bb
index 4a3ad15..025fc97 100644
--- a/meta/recipes-devtools/bison/bison_2.7.1.bb
+++ b/meta/recipes-devtools/bison/bison_2.7.1.bb
@@ -19,6 +19,7 @@ EXTRA_OECONF += "M4=m4"
SRC_URI = "${BASE_SRC_URI} \
file://fix_cross_manpage_building.patch \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
"
SRC_URI[md5sum] = "7be02eb973eccf388f1ae750fc09eed0"
diff --git a/meta/recipes-devtools/m4/m4-1.4.17.inc b/meta/recipes-devtools/m4/m4-1.4.17.inc
index 3133e99..8ea4e04 100644
--- a/meta/recipes-devtools/m4/m4-1.4.17.inc
+++ b/meta/recipes-devtools/m4/m4-1.4.17.inc
@@ -11,5 +11,8 @@ SRC_URI += "file://ac_config_links.patch \
file://remove-gets.patch \
"
+SRC_URI_append_class-target = "\
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+ "
SRC_URI[md5sum] = "a5e9954b1dae036762f7b13673a2cf76"
SRC_URI[sha256sum] = "3ce725133ee552b8b4baca7837fb772940b25e81b2a9dc92537aeaf733538c9e"
diff --git a/meta/recipes-devtools/m4/m4/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-devtools/m4/m4/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..abdfa2a
--- /dev/null
+++ b/meta/recipes-devtools/m4/m4/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,33 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Not Required
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/gnulib.mk b/lib/gnulib.mk
+index e1d74db..c0e92dd 100644
+--- a/lib/gnulib.mk
++++ b/lib/gnulib.mk
+@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
+--
+2.1.4
+
diff --git a/meta/recipes-devtools/patch/patch/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-devtools/patch/patch/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..abdfa2a
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,33 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Not Required
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/gnulib.mk b/lib/gnulib.mk
+index e1d74db..c0e92dd 100644
+--- a/lib/gnulib.mk
++++ b/lib/gnulib.mk
+@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
+--
+2.1.4
+
diff --git a/meta/recipes-devtools/patch/patch_2.7.5.bb b/meta/recipes-devtools/patch/patch_2.7.5.bb
index 20ed6c8..f3fcf5e 100644
--- a/meta/recipes-devtools/patch/patch_2.7.5.bb
+++ b/meta/recipes-devtools/patch/patch_2.7.5.bb
@@ -1,6 +1,8 @@
require patch.inc
LICENSE = "GPLv3"
+SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch"
+
SRC_URI[md5sum] = "ed4d5674ef4543b4eb463db168886dc7"
SRC_URI[sha256sum] = "7436f5a19f93c3ca83153ce9c5cbe4847e97c5d956e57a220121e741f6e7968f"
@@ -9,5 +11,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
acpaths = "-I ${S}/m4 "
PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)}"
-PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
+PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
diff --git a/meta/recipes-extended/augeas/augeas.inc b/meta/recipes-extended/augeas/augeas.inc
index 004c998..23d12ca 100644
--- a/meta/recipes-extended/augeas/augeas.inc
+++ b/meta/recipes-extended/augeas/augeas.inc
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff"
SRC_URI = "http://download.augeas.net/${BP}.tar.gz \
file://add-missing-argz-conditional.patch \
file://sepbuildfix.patch \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
"
DEPENDS = "readline libxml2"
diff --git a/meta/recipes-extended/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..b85a6a6
--- /dev/null
+++ b/meta/recipes-extended/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,30 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Not Required
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: augeas-1.2.0/gnulib/lib/Makefile.am
+===================================================================
+--- augeas-1.2.0.orig/gnulib/lib/Makefile.am
++++ augeas-1.2.0/gnulib/lib/Makefile.am
+@@ -463,7 +463,7 @@ install-exec-localcharset: all-local
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
diff --git a/meta/recipes-extended/cpio/cpio-2.11/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/cpio/cpio-2.11/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..4979415
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.11/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,30 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Not Required
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: cpio-2.11/gnu/Makefile.am
+===================================================================
+--- cpio-2.11.orig/gnu/Makefile.am
++++ cpio-2.11/gnu/Makefile.am
+@@ -734,7 +734,7 @@ install-exec-localcharset: all-local
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
diff --git a/meta/recipes-extended/cpio/cpio_2.11.bb b/meta/recipes-extended/cpio/cpio_2.11.bb
index 053888f..c5d92bf 100644
--- a/meta/recipes-extended/cpio/cpio_2.11.bb
+++ b/meta/recipes-extended/cpio/cpio_2.11.bb
@@ -8,7 +8,8 @@ PR = "r5"
SRC_URI += "file://remove-gets.patch \
file://fix-memory-overrun.patch \
file://cpio-CVE-2015-1197.patch \
- "
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+ "
SRC_URI[md5sum] = "1112bb6c45863468b5496ba128792f6c"
SRC_URI[sha256sum] = "601b1d774cd6e4cd39416203c91ec59dbd65dd27d79d75e1a9b89497ea643978"
diff --git a/meta/recipes-extended/diffutils/diffutils-3.3/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/diffutils/diffutils-3.3/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..abdfa2a
--- /dev/null
+++ b/meta/recipes-extended/diffutils/diffutils-3.3/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,33 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Not Required
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/gnulib.mk b/lib/gnulib.mk
+index e1d74db..c0e92dd 100644
+--- a/lib/gnulib.mk
++++ b/lib/gnulib.mk
+@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
+--
+2.1.4
+
diff --git a/meta/recipes-extended/diffutils/diffutils_3.3.bb b/meta/recipes-extended/diffutils/diffutils_3.3.bb
index b708962..5008690 100644
--- a/meta/recipes-extended/diffutils/diffutils_3.3.bb
+++ b/meta/recipes-extended/diffutils/diffutils_3.3.bb
@@ -4,6 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
require diffutils.inc
SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.xz \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
file://run-ptest \
"
diff --git a/meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..85d243b
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,30 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Not Required
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: findutils-4.5.14/gl/lib/Makefile.am
+===================================================================
+--- findutils-4.5.14.orig/gl/lib/Makefile.am
++++ findutils-4.5.14/gl/lib/Makefile.am
+@@ -1220,7 +1220,7 @@ install-exec-localcharset: all-local
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
diff --git a/meta/recipes-extended/findutils/findutils_4.5.14.bb b/meta/recipes-extended/findutils/findutils_4.5.14.bb
index 9253637..a58a82f 100644
--- a/meta/recipes-extended/findutils/findutils_4.5.14.bb
+++ b/meta/recipes-extended/findutils/findutils_4.5.14.bb
@@ -6,6 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
DEPENDS = "bison-native"
+SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch"
+
SRC_URI[md5sum] = "a8a8176282fd28e8d1234c84d847fa66"
SRC_URI[sha256sum] = "0de3cf625a5c9f154eee3171e072515ffdde405244dd00502af617ac57b73ae2"
diff --git a/meta/recipes-extended/grep/grep/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/grep/grep/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..abdfa2a
--- /dev/null
+++ b/meta/recipes-extended/grep/grep/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,33 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Not Required
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/gnulib.mk b/lib/gnulib.mk
+index e1d74db..c0e92dd 100644
+--- a/lib/gnulib.mk
++++ b/lib/gnulib.mk
+@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
+--
+2.1.4
+
diff --git a/meta/recipes-extended/grep/grep_2.21.bb b/meta/recipes-extended/grep/grep_2.21.bb
index 2c378d8..1c5f778 100644
--- a/meta/recipes-extended/grep/grep_2.21.bb
+++ b/meta/recipes-extended/grep/grep_2.21.bb
@@ -5,7 +5,9 @@ SECTION = "console/utils"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee"
-SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz"
+SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+ "
SRC_URI[md5sum] = "43c48064d6409862b8a850db83c8038a"
SRC_URI[sha256sum] = "5244a11c00dee8e7e5e714b9aaa053ac6cbfa27e104abee20d3c778e4bb0e5de"
diff --git a/meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..0aaf701
--- /dev/null
+++ b/meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,30 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Not Required
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: groff-1.22.3/src/libs/gnulib/lib/Makefile.am
+===================================================================
+--- groff-1.22.3.orig/src/libs/gnulib/lib/Makefile.am
++++ groff-1.22.3/src/libs/gnulib/lib/Makefile.am
+@@ -113,7 +113,7 @@ install-exec-localcharset: all-local
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
diff --git a/meta/recipes-extended/groff/groff_1.22.3.bb b/meta/recipes-extended/groff/groff_1.22.3.bb
index 7955a5c..e8cf524 100644
--- a/meta/recipes-extended/groff/groff_1.22.3.bb
+++ b/meta/recipes-extended/groff/groff_1.22.3.bb
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \
file://groff-1.22.2-correct-man.local-install-path.patch \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
"
SRC_URI[md5sum] = "cc825fa64bc7306a885f2fb2268d3ec5"
@@ -16,9 +17,7 @@ SRC_URI[sha256sum] = "3a48a9d6c97750bfbd535feeb5be0111db6406ddb7bb79fc680809cda6
DEPENDS = "groff-native"
DEPENDS_class-native = ""
-RDEPENDS_${PN} += "sed"
-
-RDEPENDS_${PN} = "perl"
+RDEPENDS_${PN} += "perl sed"
inherit autotools texinfo
@@ -54,6 +53,9 @@ do_install_append() {
sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i
fi
done
+ if [ -e ${D}${libdir}/charset.alias ]; then
+ rm -rf ${D}${libdir}/charset.alias
+ fi
}
do_install_append_class-native() {
diff --git a/meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..abdfa2a
--- /dev/null
+++ b/meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,33 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Not Required
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/gnulib.mk b/lib/gnulib.mk
+index e1d74db..c0e92dd 100644
+--- a/lib/gnulib.mk
++++ b/lib/gnulib.mk
+@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
+--
+2.1.4
+
diff --git a/meta/recipes-extended/sed/sed_4.2.2.bb b/meta/recipes-extended/sed/sed_4.2.2.bb
index bbfa238..a1e3483 100644
--- a/meta/recipes-extended/sed/sed_4.2.2.bb
+++ b/meta/recipes-extended/sed/sed_4.2.2.bb
@@ -7,6 +7,7 @@ SECTION = "console/utils"
SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz \
file://sed-add-ptest.patch \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
file://run-ptest \
"
diff --git a/meta/recipes-extended/texinfo/texinfo/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/texinfo/texinfo/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..6ea6380
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,30 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Not Required
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: texinfo-5.2/gnulib/lib/Makefile.am
+===================================================================
+--- texinfo-5.2.orig/gnulib/lib/Makefile.am
++++ texinfo-5.2/gnulib/lib/Makefile.am
+@@ -378,7 +378,7 @@ install-exec-localcharset: all-local
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
diff --git a/meta/recipes-extended/texinfo/texinfo_5.2.bb b/meta/recipes-extended/texinfo/texinfo_5.2.bb
index 8dbcaa1..aa644e1 100644
--- a/meta/recipes-extended/texinfo/texinfo_5.2.bb
+++ b/meta/recipes-extended/texinfo/texinfo_5.2.bb
@@ -34,6 +34,7 @@ SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \
file://disable-native-tools.patch \
file://link-zip.patch \
file://dont-depend-on-help2man.patch \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
${TARGET_PATCH} \
"
@@ -58,7 +59,7 @@ do_compile_prepend() {
do_install_append() {
mkdir -p ${D}${datadir}/${tex_texinfo}
- install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo}
+ install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo}
sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2any ${D}${bindir}/pod2texi
}
diff --git a/meta/recipes-extended/wget/wget/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/wget/wget/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..c1cbd14
--- /dev/null
+++ b/meta/recipes-extended/wget/wget/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,30 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Not Required
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: wget-1.16.3/lib/Makefile.am
+===================================================================
+--- wget-1.16.3.orig/lib/Makefile.am
++++ wget-1.16.3/lib/Makefile.am
+@@ -846,7 +846,7 @@ install-exec-localcharset: all-local
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
diff --git a/meta/recipes-extended/wget/wget_1.16.3.bb b/meta/recipes-extended/wget/wget_1.16.3.bb
index 87755b2..5c34a42 100644
--- a/meta/recipes-extended/wget/wget_1.16.3.bb
+++ b/meta/recipes-extended/wget/wget_1.16.3.bb
@@ -1,5 +1,6 @@
SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
file://fix_makefile.patch \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
"
SRC_URI[md5sum] = "f61d9011b99f824106a5d5a05dd0f63d"
diff --git a/meta/recipes-support/libunistring/libunistring/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-support/libunistring/libunistring/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..a62194b
--- /dev/null
+++ b/meta/recipes-support/libunistring/libunistring/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,30 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Not Required
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: libunistring-0.9.4/lib/Makefile.gnulib
+===================================================================
+--- libunistring-0.9.4.orig/lib/Makefile.gnulib
++++ libunistring-0.9.4/lib/Makefile.gnulib
+@@ -380,7 +380,7 @@ install-exec-localcharset: all-local
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
diff --git a/meta/recipes-support/libunistring/libunistring_0.9.4.bb b/meta/recipes-support/libunistring/libunistring_0.9.4.bb
index 89b1dc2..289c813 100644
--- a/meta/recipes-support/libunistring/libunistring_0.9.4.bb
+++ b/meta/recipes-support/libunistring/libunistring_0.9.4.bb
@@ -19,6 +19,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
SRC_URI = "${GNU_MIRROR}/libunistring/libunistring-${PV}.tar.gz \
file://iconv-m4-remove-the-test-to-convert-euc-jp.patch \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
"
SRC_URI[md5sum] = "c24a6a3838d9ad4a41a62549312c4226"
--
2.1.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 09/10] mtd-utils: update to latest and fix static inlining
2015-04-16 1:59 [PATCH 00/10] More musl fixes Khem Raj
` (7 preceding siblings ...)
2015-04-16 2:00 ` [PATCH 08/10] recipes: Fix charset.alias for musl Khem Raj
@ 2015-04-16 2:00 ` Khem Raj
2015-04-16 2:00 ` [PATCH 10/10] connman: Fix builds to compile on musl Khem Raj
9 siblings, 0 replies; 11+ messages in thread
From: Khem Raj @ 2015-04-16 2:00 UTC (permalink / raw)
To: openembedded-core
use static storage class instead of extern for inline functions
and remove duplicate definitions as a result
Change-Id: I72e8c5f19dff656c18f719d1e9e2ca697c9a856f
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...emove-duplicate-hashtable_iterator_value-.patch | 64 ++++++++++++++++++++++
meta/recipes-devtools/mtd/mtd-utils_git.bb | 1 +
2 files changed, 65 insertions(+)
create mode 100644 meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch
diff --git a/meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch b/meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch
new file mode 100644
index 0000000..2d36158
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch
@@ -0,0 +1,64 @@
+From b856ff35c20124ceae40bbc4d32584df47618c96 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 25 Feb 2015 09:28:26 +0000
+Subject: [PATCH] hashtable: Remove duplicate hashtable_iterator_value/hashtable_iterator_key
+
+gcc5 is defaulting to gnu11 instead of gnu89 like previous versions
+as a result the semantics of 'extern inline' changes where in gnu89 for 'extern inline' no external
+visible function is generated,in c99 'external inline' generates externally visible function
+there is no equivalent in c99+ because redefinitions arent allowed
+but 'static inline' remains same for for c89 and c99+, thats why we change the semantics
+so we make the functions static inline, and achieve the same effect
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: pending
+
+---
+ mkfs.ubifs/hashtable/hashtable_itr.c | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+Index: git/mkfs.ubifs/hashtable/hashtable_itr.h
+===================================================================
+--- git.orig/mkfs.ubifs/hashtable/hashtable_itr.h
++++ git/mkfs.ubifs/hashtable/hashtable_itr.h
+@@ -28,7 +28,7 @@ hashtable_iterator(struct hashtable *h);
+ /* hashtable_iterator_key
+ * - return the value of the (key,value) pair at the current position */
+
+-extern inline void *
++static inline void *
+ hashtable_iterator_key(struct hashtable_itr *i)
+ {
+ return i->e->k;
+@@ -37,7 +37,7 @@ hashtable_iterator_key(struct hashtable_
+ /*****************************************************************************/
+ /* value - return the value of the (key,value) pair at the current position */
+
+-extern inline void *
++static inline void *
+ hashtable_iterator_value(struct hashtable_itr *i)
+ {
+ return i->e->v;
+Index: git/mkfs.ubifs/hashtable/hashtable_itr.c
+===================================================================
+--- git.orig/mkfs.ubifs/hashtable/hashtable_itr.c
++++ git/mkfs.ubifs/hashtable/hashtable_itr.c
+@@ -35,18 +35,6 @@ hashtable_iterator(struct hashtable *h)
+ }
+
+ /*****************************************************************************/
+-/* key - return the key of the (key,value) pair at the current position */
+-/* value - return the value of the (key,value) pair at the current position */
+-
+-void *
+-hashtable_iterator_key(struct hashtable_itr *i)
+-{ return i->e->k; }
+-
+-void *
+-hashtable_iterator_value(struct hashtable_itr *i)
+-{ return i->e->v; }
+-
+-/*****************************************************************************/
+ /* advance - advance the iterator to the next element
+ * returns zero if advanced to end of table */
+
diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb b/meta/recipes-devtools/mtd/mtd-utils_git.bb
index 12daffe..f991ea1 100644
--- a/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -13,6 +13,7 @@ SRCREV = "9f107132a6a073cce37434ca9cda6917dd8d866b"
SRC_URI = "git://git.infradead.org/mtd-utils.git \
file://add-exclusion-to-mkfs-jffs2-git-2.patch \
file://fix-armv7-neon-alignment.patch \
+ file://0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch \
"
S = "${WORKDIR}/git/"
--
2.1.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 10/10] connman: Fix builds to compile on musl
2015-04-16 1:59 [PATCH 00/10] More musl fixes Khem Raj
` (8 preceding siblings ...)
2015-04-16 2:00 ` [PATCH 09/10] mtd-utils: update to latest and fix static inlining Khem Raj
@ 2015-04-16 2:00 ` Khem Raj
9 siblings, 0 replies; 11+ messages in thread
From: Khem Raj @ 2015-04-16 2:00 UTC (permalink / raw)
To: openembedded-core
Add explicit includes for headers which are indirectly included on glibc
Dont use backtrace APIs on non-glibc C libs
res_nimit is a glibc specific API in resolvers so we avoid it
Change-Id: I78a173f02f8c117ebb513311f27a48bc8d645efe
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...cktrace-API-only-when-compiling-for-glibc.patch | 41 ++++
| 235 +++++++++++++++++++++
...resolve-musl-does-not-implement-res_ninit.patch | 77 +++++++
...Fix-duplicate-definitions-issue-with-musl.patch | 43 ++++
meta/recipes-connectivity/connman/connman_1.28.bb | 4 +
5 files changed, 400 insertions(+)
create mode 100644 meta/recipes-connectivity/connman/connman/0001-Enable-backtrace-API-only-when-compiling-for-glibc.patch
create mode 100644 meta/recipes-connectivity/connman/connman/0002-musl-header-fixes.patch
create mode 100644 meta/recipes-connectivity/connman/connman/0003-resolve-musl-does-not-implement-res_ninit.patch
create mode 100644 meta/recipes-connectivity/connman/connman/0004-tethering-Fix-duplicate-definitions-issue-with-musl.patch
diff --git a/meta/recipes-connectivity/connman/connman/0001-Enable-backtrace-API-only-when-compiling-for-glibc.patch b/meta/recipes-connectivity/connman/connman/0001-Enable-backtrace-API-only-when-compiling-for-glibc.patch
new file mode 100644
index 0000000..873843b
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0001-Enable-backtrace-API-only-when-compiling-for-glibc.patch
@@ -0,0 +1,41 @@
+From b736e90681e135e0cccb143a9ce8b7049e1ec0f0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 6 Apr 2015 22:57:20 -0700
+Subject: [PATCH 1/4] Enable backtrace() API only when compiling for glibc
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/log.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/log.c b/src/log.c
+index a693bd0..3bf9fcc 100644
+--- a/src/log.c
++++ b/src/log.c
+@@ -30,7 +30,9 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <syslog.h>
++#ifdef __GLIBC__
+ #include <execinfo.h>
++#endif
+ #include <dlfcn.h>
+
+ #include "connman.h"
+@@ -215,9 +217,9 @@ static void print_backtrace(unsigned int offset)
+ static void signal_handler(int signo)
+ {
+ connman_error("Aborting (signal %d) [%s]", signo, program_exec);
+-
++#ifdef __GLIBC__
+ print_backtrace(2);
+-
++#endif
+ exit(EXIT_FAILURE);
+ }
+
+--
+2.1.4
+
--git a/meta/recipes-connectivity/connman/connman/0002-musl-header-fixes.patch b/meta/recipes-connectivity/connman/connman/0002-musl-header-fixes.patch
new file mode 100644
index 0000000..058f1dc
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0002-musl-header-fixes.patch
@@ -0,0 +1,235 @@
+From b6ff3a5989e72307cd54a840179ea072c4e0213e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 6 Apr 2015 22:59:55 -0700
+Subject: [PATCH 2/4] musl header fixes
+
+ported from
+http://git.alpinelinux.org/cgit/aports/plain/testing/connman/musl-fixes.patch
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 1 +
+ gdhcp/common.c | 6 +++++-
+ gweb/gresolv.c | 1 +
+ plugins/wifi.c | 3 +--
+ src/ippool.c | 2 +-
+ src/iptables.c | 2 +-
+ src/log.c | 2 ++
+ src/ntp.c | 2 +-
+ src/tethering.c | 2 --
+ tools/dhcp-test.c | 1 -
+ tools/dnsproxy-test.c | 1 +
+ tools/private-network-test.c | 2 +-
+ tools/tap-test.c | 2 +-
+ 13 files changed, 16 insertions(+), 11 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6fa01ba..493a5f1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -165,6 +165,7 @@ fi
+ AM_CONDITIONAL(PPTP, test "${enable_pptp}" != "no")
+ AM_CONDITIONAL(PPTP_BUILTIN, test "${enable_pptp}" = "builtin")
+
++AC_CHECK_HEADERS(execinfo.h)
+ AC_CHECK_HEADERS(resolv.h, dummy=yes,
+ AC_MSG_ERROR(resolver header files are required))
+ AC_CHECK_LIB(resolv, ns_initparse, dummy=yes, [
+diff --git a/gdhcp/common.c b/gdhcp/common.c
+index 48fcdef..40ade87 100644
+--- a/gdhcp/common.c
++++ b/gdhcp/common.c
+@@ -22,6 +22,7 @@
+ #include <config.h>
+ #endif
+
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <errno.h>
+@@ -31,7 +32,6 @@
+ #include <string.h>
+ #include <endian.h>
+ #include <net/if_arp.h>
+-#include <linux/if.h>
+ #include <netpacket/packet.h>
+ #include <net/ethernet.h>
+ #include <arpa/inet.h>
+@@ -40,6 +40,8 @@
+ #include "gdhcp.h"
+ #include "common.h"
+
++#include <linux/if.h>
++
+ static const DHCPOption client_options[] = {
+ { OPTION_IP, 0x01 }, /* subnet-mask */
+ { OPTION_IP | OPTION_LIST, 0x03 }, /* routers */
+@@ -474,10 +476,12 @@ static const struct in6_addr in6addr_all_dhcp_relay_agents_and_servers_mc =
+ IN6ADDR_ALL_DHCP_RELAY_AGENTS_AND_SERVERS_MC_INIT;
+
+ /* from netinet/in.h */
++#if 0
+ struct in6_pktinfo {
+ struct in6_addr ipi6_addr; /* src/dst IPv6 address */
+ unsigned int ipi6_ifindex; /* send/recv interface index */
+ };
++#endif
+
+ int dhcpv6_send_packet(int index, struct dhcpv6_packet *dhcp_pkt, int len)
+ {
+diff --git a/gweb/gresolv.c b/gweb/gresolv.c
+index 5cf7a9a..c11a1d9 100644
+--- a/gweb/gresolv.c
++++ b/gweb/gresolv.c
+@@ -24,6 +24,7 @@
+ #endif
+
+ #include <errno.h>
++#include <stdio.h>
+ #include <unistd.h>
+ #include <stdarg.h>
+ #include <string.h>
+diff --git a/plugins/wifi.c b/plugins/wifi.c
+index 1f90a31..427c552 100644
+--- a/plugins/wifi.c
++++ b/plugins/wifi.c
+@@ -30,9 +30,8 @@
+ #include <string.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+-#include <linux/if_arp.h>
+-#include <linux/wireless.h>
+ #include <net/ethernet.h>
++#include <linux/wireless.h>
+
+ #ifndef IFF_LOWER_UP
+ #define IFF_LOWER_UP 0x10000
+diff --git a/src/ippool.c b/src/ippool.c
+index bb8568d..f1eb1f3 100644
+--- a/src/ippool.c
++++ b/src/ippool.c
+@@ -28,7 +28,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
+-#include <sys/errno.h>
++#include <errno.h>
+ #include <sys/socket.h>
+
+ #include "connman.h"
+diff --git a/src/iptables.c b/src/iptables.c
+index 8d583ea..a91a451 100644
+--- a/src/iptables.c
++++ b/src/iptables.c
+@@ -28,7 +28,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
+-#include <sys/errno.h>
++#include <errno.h>
+ #include <sys/socket.h>
+ #include <xtables.h>
+
+diff --git a/src/log.c b/src/log.c
+index 3bf9fcc..3b9843f 100644
+--- a/src/log.c
++++ b/src/log.c
+@@ -114,6 +114,7 @@ void connman_debug(const char *format, ...)
+
+ static void print_backtrace(unsigned int offset)
+ {
++#ifdef HAVE_EXECINFO_H
+ void *frames[99];
+ size_t n_ptrs;
+ unsigned int i;
+@@ -212,6 +213,7 @@ static void print_backtrace(unsigned int offset)
+
+ close(outfd[1]);
+ close(infd[0]);
++#endif /* HAVE_EXECINFO_H */
+ }
+
+ static void signal_handler(int signo)
+diff --git a/src/ntp.c b/src/ntp.c
+index abb2caa..dd50532 100644
+--- a/src/ntp.c
++++ b/src/ntp.c
+@@ -180,7 +180,7 @@ static void send_packet(int fd, const char *server, uint32_t timeout)
+ msg.xmttime.fraction = htonl(transmit_timeval.tv_usec * 1000);
+
+ len = sendto(fd, &msg, sizeof(msg), MSG_DONTWAIT,
+- &addr, sizeof(addr));
++ (struct sockaddr *) &addr, sizeof(addr));
+ if (len < 0) {
+ connman_error("Time request for server %s failed (%d/%s)",
+ server, errno, strerror(errno));
+diff --git a/src/tethering.c b/src/tethering.c
+index ceeec74..c44cb36 100644
+--- a/src/tethering.c
++++ b/src/tethering.c
+@@ -31,10 +31,8 @@
+ #include <stdio.h>
+ #include <sys/ioctl.h>
+ #include <net/if.h>
+-#include <linux/sockios.h>
+ #include <string.h>
+ #include <fcntl.h>
+-#include <linux/if_tun.h>
+ #include <netinet/in.h>
+ #include <linux/if_bridge.h>
+
+diff --git a/tools/dhcp-test.c b/tools/dhcp-test.c
+index c34e10a..eae66fc 100644
+--- a/tools/dhcp-test.c
++++ b/tools/dhcp-test.c
+@@ -33,7 +33,6 @@
+ #include <arpa/inet.h>
+ #include <net/route.h>
+ #include <net/ethernet.h>
+-#include <linux/if_arp.h>
+
+ #include <gdhcp/gdhcp.h>
+
+diff --git a/tools/dnsproxy-test.c b/tools/dnsproxy-test.c
+index 551cae9..371e2e2 100644
+--- a/tools/dnsproxy-test.c
++++ b/tools/dnsproxy-test.c
+@@ -24,6 +24,7 @@
+ #endif
+
+ #include <errno.h>
++#include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+diff --git a/tools/private-network-test.c b/tools/private-network-test.c
+index 3dd115b..2828bb3 100644
+--- a/tools/private-network-test.c
++++ b/tools/private-network-test.c
+@@ -32,7 +32,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <signal.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/signalfd.h>
+ #include <unistd.h>
+
+diff --git a/tools/tap-test.c b/tools/tap-test.c
+index fdc098a..ea9a567 100644
+--- a/tools/tap-test.c
++++ b/tools/tap-test.c
+@@ -29,7 +29,7 @@
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <string.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/ioctl.h>
+
+ #include <netinet/in.h>
+--
+2.1.4
+
diff --git a/meta/recipes-connectivity/connman/connman/0003-resolve-musl-does-not-implement-res_ninit.patch b/meta/recipes-connectivity/connman/connman/0003-resolve-musl-does-not-implement-res_ninit.patch
new file mode 100644
index 0000000..28931c1
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0003-resolve-musl-does-not-implement-res_ninit.patch
@@ -0,0 +1,77 @@
+From 93bb904cc4e1e97152e6408077ba136fc883b6bb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 6 Apr 2015 23:02:21 -0700
+Subject: [PATCH 3/4] resolve: musl does not implement res_ninit
+
+ported from
+http://git.alpinelinux.org/cgit/aports/plain/testing/connman/libresolv.patch
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gweb/gresolv.c | 33 ++++++++++++---------------------
+ 1 file changed, 12 insertions(+), 21 deletions(-)
+
+diff --git a/gweb/gresolv.c b/gweb/gresolv.c
+index c11a1d9..991b14c 100644
+--- a/gweb/gresolv.c
++++ b/gweb/gresolv.c
+@@ -876,8 +876,6 @@ GResolv *g_resolv_new(int index)
+ resolv->index = index;
+ resolv->nameserver_list = NULL;
+
+- res_ninit(&resolv->res);
+-
+ return resolv;
+ }
+
+@@ -917,8 +915,6 @@ void g_resolv_unref(GResolv *resolv)
+
+ flush_nameservers(resolv);
+
+- res_nclose(&resolv->res);
+-
+ g_free(resolv);
+ }
+
+@@ -1021,24 +1017,19 @@ guint g_resolv_lookup_hostname(GResolv *resolv, const char *hostname,
+ debug(resolv, "hostname %s", hostname);
+
+ if (!resolv->nameserver_list) {
+- int i;
+-
+- for (i = 0; i < resolv->res.nscount; i++) {
+- char buf[100];
+- int family = resolv->res.nsaddr_list[i].sin_family;
+- void *sa_addr = &resolv->res.nsaddr_list[i].sin_addr;
+-
+- if (family != AF_INET &&
+- resolv->res._u._ext.nsaddrs[i]) {
+- family = AF_INET6;
+- sa_addr = &resolv->res._u._ext.nsaddrs[i]->sin6_addr;
++ FILE *f = fopen("/etc/resolv.conf", "r");
++ if (f) {
++ char line[256], *s;
++ int i;
++ while (fgets(line, sizeof(line), f)) {
++ if (strncmp(line, "nameserver", 10) || !isspace(line[10]))
++ continue;
++ for (s = &line[11]; isspace(s[0]); s++);
++ for (i = 0; s[i] && !isspace(s[i]); i++);
++ s[i] = 0;
++ g_resolv_add_nameserver(resolv, s, 53, 0);
+ }
+-
+- if (family != AF_INET && family != AF_INET6)
+- continue;
+-
+- if (inet_ntop(family, sa_addr, buf, sizeof(buf)))
+- g_resolv_add_nameserver(resolv, buf, 53, 0);
++ fclose(f);
+ }
+
+ if (!resolv->nameserver_list)
+--
+2.1.4
+
diff --git a/meta/recipes-connectivity/connman/connman/0004-tethering-Fix-duplicate-definitions-issue-with-musl.patch b/meta/recipes-connectivity/connman/connman/0004-tethering-Fix-duplicate-definitions-issue-with-musl.patch
new file mode 100644
index 0000000..80a4831
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0004-tethering-Fix-duplicate-definitions-issue-with-musl.patch
@@ -0,0 +1,43 @@
+From 6c1854401b4888fbf420ceb7b1e18097b91fb488 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 6 Apr 2015 23:48:23 -0700
+Subject: [PATCH 4/4] tethering: Fix duplicate definitions issue with musl
+
+We just need this one define BRCTL_GET_VERSION
+from linux/if_bridge.h
+So lets define it if not defined already and remove
+including linux/if_bridge.h because it include's linux/in6.h
+which then conflicts with musl's netinet/in.h
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/tethering.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/tethering.c b/src/tethering.c
+index c44cb36..62fce36 100644
+--- a/src/tethering.c
++++ b/src/tethering.c
+@@ -34,14 +34,15 @@
+ #include <string.h>
+ #include <fcntl.h>
+ #include <netinet/in.h>
+-#include <linux/if_bridge.h>
+
+ #include "connman.h"
+
+ #include <gdhcp/gdhcp.h>
+
+ #include <gdbus.h>
+-
++#ifndef BRCTL_GET_VERSION
++#define BRCTL_GET_VERSION 0
++#endif
+ #ifndef DBUS_TYPE_UNIX_FD
+ #define DBUS_TYPE_UNIX_FD -1
+ #endif
+--
+2.1.4
+
diff --git a/meta/recipes-connectivity/connman/connman_1.28.bb b/meta/recipes-connectivity/connman/connman_1.28.bb
index 53e71fa..a395d63 100644
--- a/meta/recipes-connectivity/connman/connman_1.28.bb
+++ b/meta/recipes-connectivity/connman/connman_1.28.bb
@@ -3,6 +3,10 @@ require connman.inc
SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
file://add_xuser_dbus_permission.patch \
+ file://0001-Enable-backtrace-API-only-when-compiling-for-glibc.patch \
+ file://0002-musl-header-fixes.patch \
+ file://0003-resolve-musl-does-not-implement-res_ninit.patch \
+ file://0004-tethering-Fix-duplicate-definitions-issue-with-musl.patch \
file://connman \
"
SRC_URI[md5sum] = "6e07c93877f80bb73c9d4dbfc697f3fc"
--
2.1.4
^ permalink raw reply related [flat|nested] 11+ messages in thread