]> code.ossystems Code Review - openembedded-core.git/commitdiff
mc: Fix musl build failure
authorPaul Barker <paul@paulbarker.me.uk>
Wed, 20 Aug 2014 15:15:12 +0000 (15:15 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 23 Aug 2014 22:01:33 +0000 (23:01 +0100)
The CTRL macro just needs to be defined.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/mc/mc/mc-CTRL.patch [new file with mode: 0644]
meta/recipes-extended/mc/mc_4.7.5.2.bb
meta/recipes-extended/mc/mc_4.8.12.bb

diff --git a/meta/recipes-extended/mc/mc/mc-CTRL.patch b/meta/recipes-extended/mc/mc/mc-CTRL.patch
new file mode 100644 (file)
index 0000000..d532bde
--- /dev/null
@@ -0,0 +1,31 @@
+Fix build with musl by ensuring CTRL is defined.
+
+musl does not define CTRL in <termios.h>, we could include <sys/ttydefaults.h>
+explicitly but it's easier just to ensure CTRL is defined.
+
+This patch is taken from Sabotage Linux, the license statement for patches and
+build scripts in Sabotage Linux says:
+
+    To the extent possible under law, Christian Neukirchen has waived
+    all copyright and related or neighboring rights to this work.
+
+    http://creativecommons.org/publicdomain/zero/1.0/
+
+Therefore this should be good to include in OpenEmbedded.
+
+Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
+
+Upstream-status: Pending
+
+diff -u mc-4.8.1.7.org/lib/tty/tty-ncurses.c mc-4.8.1.7/lib/tty/tty-ncurses.c
+--- mc-4.8.1.7.org/lib/tty/tty-ncurses.c
++++ mc-4.8.1.7/lib/tty/tty-ncurses.c
+@@ -65,7 +65,7 @@
+ /*** file scope macro definitions ****************************************************************/
+-#if defined(_AIX) && !defined(CTRL)
++#if !defined(CTRL)
+ #define CTRL(x) ((x) & 0x1f)
+ #endif
index 0e4434c7d9dd27bd4e8bb7ba660e2a3239a7652c..b47eb02323fe494714478c6e528b5a771b8af5a6 100644 (file)
@@ -8,7 +8,9 @@ RDEPENDS_${PN} = "ncurses-terminfo"
 
 PR = "r3"
 
-SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2"
+SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
+           file://mc-CTRL.patch \
+           "
 
 SRC_URI[md5sum] = "bdae966244496cd4f6d282d80c9cf3c6"
 SRC_URI[sha256sum] = "a68338862bb30017eb65ed569a58e80ab66ae8cef11c886440c9e9f4d1efc6ab"
index b8971931d96f26c04f8449feb9941b09e6898c4c..bc462e3fc083b64f766bb4050fd0b4147e51fb21 100644 (file)
@@ -6,7 +6,9 @@ SECTION = "console/utils"
 DEPENDS = "ncurses glib-2.0"
 RDEPENDS_${PN} = "ncurses-terminfo"
 
-SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2"
+SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
+           file://mc-CTRL.patch \
+           "
 
 SRC_URI[md5sum] = "a64c426364bfaee56b628f6c0738aade"
 SRC_URI[sha256sum] = "1054fcc27a488771cbe5b85d7c10135fa1cd1b7682a19930d44b51a023e39396"