summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhenhua Luo <zhenhua.luo@freescale.com>2014-03-26 20:22:36 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2014-03-29 22:39:50 +0100
commit56e6228696a25d27c7b271701debf314aa9d53d5 (patch)
tree09030f80e9b9d64912f38ce6e0e68abde28e5ba4
parentf717a295431e518a7bbd6ed878340aecfebd4e2f (diff)
downloadmeta-openembedded-56e6228696a25d27c7b271701debf314aa9d53d5.tar.gz
lvm2: replace CPPFunction with rl_completion_func_t to fix build error
lvm2 depends on readline, CPPFunction has been replaced by rl_completion_func_t in recent readline, Error log: | lvm.c: In function 'lvm_shell': | lvm.c:189:38: error: 'CPPFunction' undeclared (first use in this function) | rl_attempted_completion_function = (CPPFunction *) _completion; | ^ Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-oe/recipes-support/lvm2/lvm2.inc1
-rw-r--r--meta-oe/recipes-support/lvm2/lvm2/0001-Replace-CPPFunction-with-rl_completion_func_t.patch33
2 files changed, 34 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
index c2e100701..4b43328e2 100644
--- a/meta-oe/recipes-support/lvm2/lvm2.inc
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -9,6 +9,7 @@ INC_PR = "r4"
9 9
10S = "${WORKDIR}/LVM2.${PV}" 10S = "${WORKDIR}/LVM2.${PV}"
11SRC_URI = "ftp://sources.redhat.com/pub/lvm2/old/LVM2.${PV}.tgz \ 11SRC_URI = "ftp://sources.redhat.com/pub/lvm2/old/LVM2.${PV}.tgz \
12 file://0001-Replace-CPPFunction-with-rl_completion_func_t.patch \
12 file://lvm.conf" 13 file://lvm.conf"
13 14
14PACKAGECONFIG ??= "readline" 15PACKAGECONFIG ??= "readline"
diff --git a/meta-oe/recipes-support/lvm2/lvm2/0001-Replace-CPPFunction-with-rl_completion_func_t.patch b/meta-oe/recipes-support/lvm2/lvm2/0001-Replace-CPPFunction-with-rl_completion_func_t.patch
new file mode 100644
index 000000000..98c21fdb3
--- /dev/null
+++ b/meta-oe/recipes-support/lvm2/lvm2/0001-Replace-CPPFunction-with-rl_completion_func_t.patch
@@ -0,0 +1,33 @@
1From e2484e179c389b98366c8b66b451d9d2ba8f35e8 Mon Sep 17 00:00:00 2001
2From: Zhenhua Luo <zhenhua.luo@freescale.com>
3Date: Tue, 25 Mar 2014 17:39:43 +0800
4Subject: [PATCH] Replace CPPFunction with rl_completion_func_t
5
6lvm2 depends on readline, CPPFunction has been replaced by rl_completion_func_t
7in recent readline,
8
9Upstream-Status: Inappropriate [configuration]
10The change depends on the build environment, it is required by OpenEmbedded env
11due to readline upgrade.
12
13Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
14---
15 tools/lvm.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/tools/lvm.c b/tools/lvm.c
19index e002a76..5fa35d2 100644
20--- a/tools/lvm.c
21+++ b/tools/lvm.c
22@@ -186,7 +186,7 @@ int lvm_shell(struct cmd_context *cmd, struct cmdline_context *cmdline)
23 char *input = NULL, *args[MAX_ARGS], **argv;
24
25 rl_readline_name = "lvm";
26- rl_attempted_completion_function = (CPPFunction *) _completion;
27+ rl_attempted_completion_function = (rl_completion_func_t *) _completion;
28
29 _read_history(cmd);
30
31--
321.9.1
33