Patchwork [5/6] parted: add patch to handle deprecated readline function

login
register
mail settings
Submitter Saul Wold
Date March 4, 2014, 10:51 p.m.
Message ID <f4a8117a063733ed6353baf0eb89377ec9ba26c8.1393973357.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/67993/
State Accepted
Commit 593aef7932d5cc204acc582758484314ba6ffbae
Headers show

Comments

Saul Wold - March 4, 2014, 10:51 p.m.
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 .../parted-3.1/fix-deprecated-readline.patch       | 34 ++++++++++++++++++++++
 meta/recipes-extended/parted/parted_3.1.bb         |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch

Patch

diff --git a/meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch b/meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch
new file mode 100644
index 0000000..c4ca06d
--- /dev/null
+++ b/meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch
@@ -0,0 +1,34 @@ 
+
+From: Gustavo Zacarias
+Subject: bug#16929: [PATCH] ui: switch to new-style readline typedef
+Date: Mon, 3 Mar 2014 10:40:08 -0300
+
+The CPPFunction typedef (among others) have been deprecated in favour of
+specific prototyped typedefs since readline 4.2 (circa 2001).
+It's been working since because compatibility typedefs have been in
+place until they where removed in the recent readline 6.3 release.
+Switch to the new style to avoid build breakage.
+
+Signed-off-by: Gustavo Zacarias <address@hidden>
+
+Upstream-Status: Backport
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+---
+ parted/ui.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/parted/ui.c b/parted/ui.c
+index 786deed..b33f6fc 100644
+--- a/parted/ui.c
++++ b/parted/ui.c
+@@ -1470,7 +1470,7 @@ init_readline (void)
+ #ifdef HAVE_LIBREADLINE
+   if (!opt_script_mode) {
+     rl_initialize ();
+-    rl_attempted_completion_function = (CPPFunction*) complete_function;
++    rl_attempted_completion_function = (rl_completion_func_t *) complete_function;
+     readline_state.in_readline = 0;
+   }
+ #endif
diff --git a/meta/recipes-extended/parted/parted_3.1.bb b/meta/recipes-extended/parted/parted_3.1.bb
index 1e07da4..8344ea8 100644
--- a/meta/recipes-extended/parted/parted_3.1.bb
+++ b/meta/recipes-extended/parted/parted_3.1.bb
@@ -12,6 +12,7 @@  SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \
            file://fix-git-version-gen.patch \
            file://fix-doc-mandir.patch \
            file://fix-dvh-overflows.patch \
+           file://fix-deprecated-readline.patch \
            file://run-ptest \
            file://Makefile \
 "