diff options
| author | Zhenhua Luo <zhenhua.luo@freescale.com> | 2014-03-26 20:22:36 +0800 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-03-29 22:39:50 +0100 |
| commit | 56e6228696a25d27c7b271701debf314aa9d53d5 (patch) | |
| tree | 09030f80e9b9d64912f38ce6e0e68abde28e5ba4 | |
| parent | f717a295431e518a7bbd6ed878340aecfebd4e2f (diff) | |
| download | meta-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.inc | 1 | ||||
| -rw-r--r-- | meta-oe/recipes-support/lvm2/lvm2/0001-Replace-CPPFunction-with-rl_completion_func_t.patch | 33 |
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 c2e100701c..4b43328e23 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 | ||
| 10 | S = "${WORKDIR}/LVM2.${PV}" | 10 | S = "${WORKDIR}/LVM2.${PV}" |
| 11 | SRC_URI = "ftp://sources.redhat.com/pub/lvm2/old/LVM2.${PV}.tgz \ | 11 | SRC_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 | ||
| 14 | PACKAGECONFIG ??= "readline" | 15 | PACKAGECONFIG ??= "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 0000000000..98c21fdb37 --- /dev/null +++ b/meta-oe/recipes-support/lvm2/lvm2/0001-Replace-CPPFunction-with-rl_completion_func_t.patch | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | From e2484e179c389b98366c8b66b451d9d2ba8f35e8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Zhenhua Luo <zhenhua.luo@freescale.com> | ||
| 3 | Date: Tue, 25 Mar 2014 17:39:43 +0800 | ||
| 4 | Subject: [PATCH] Replace CPPFunction with rl_completion_func_t | ||
| 5 | |||
| 6 | lvm2 depends on readline, CPPFunction has been replaced by rl_completion_func_t | ||
| 7 | in recent readline, | ||
| 8 | |||
| 9 | Upstream-Status: Inappropriate [configuration] | ||
| 10 | The change depends on the build environment, it is required by OpenEmbedded env | ||
| 11 | due to readline upgrade. | ||
| 12 | |||
| 13 | Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com> | ||
| 14 | --- | ||
| 15 | tools/lvm.c | 2 +- | ||
| 16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 17 | |||
| 18 | diff --git a/tools/lvm.c b/tools/lvm.c | ||
| 19 | index 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 | -- | ||
| 32 | 1.9.1 | ||
| 33 | |||
