* [meta-oe v2] lvm2: replace CPPFunction with rl_completion_func_t to fix build error
@ 2014-03-26 12:22 Zhenhua Luo
2014-03-27 8:04 ` Robert Yang
0 siblings, 1 reply; 2+ messages in thread
From: Zhenhua Luo @ 2014-03-26 12:22 UTC (permalink / raw)
To: openembedded-devel; +Cc: b40527
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>
---
meta-oe/recipes-support/lvm2/lvm2.inc | 1 +
...ace-CPPFunction-with-rl_completion_func_t.patch | 33 ++++++++++++++++++++++
2 files changed, 34 insertions(+)
create mode 100644 meta-oe/recipes-support/lvm2/lvm2/0001-Replace-CPPFunction-with-rl_completion_func_t.patch
diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
index c2e1007..4b43328 100644
--- a/meta-oe/recipes-support/lvm2/lvm2.inc
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -9,6 +9,7 @@ INC_PR = "r4"
S = "${WORKDIR}/LVM2.${PV}"
SRC_URI = "ftp://sources.redhat.com/pub/lvm2/old/LVM2.${PV}.tgz \
+ file://0001-Replace-CPPFunction-with-rl_completion_func_t.patch \
file://lvm.conf"
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 0000000..98c21fd
--- /dev/null
+++ b/meta-oe/recipes-support/lvm2/lvm2/0001-Replace-CPPFunction-with-rl_completion_func_t.patch
@@ -0,0 +1,33 @@
+From e2484e179c389b98366c8b66b451d9d2ba8f35e8 Mon Sep 17 00:00:00 2001
+From: Zhenhua Luo <zhenhua.luo@freescale.com>
+Date: Tue, 25 Mar 2014 17:39:43 +0800
+Subject: [PATCH] Replace CPPFunction with rl_completion_func_t
+
+lvm2 depends on readline, CPPFunction has been replaced by rl_completion_func_t
+in recent readline,
+
+Upstream-Status: Inappropriate [configuration]
+The change depends on the build environment, it is required by OpenEmbedded env
+due to readline upgrade.
+
+Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
+---
+ tools/lvm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/lvm.c b/tools/lvm.c
+index e002a76..5fa35d2 100644
+--- a/tools/lvm.c
++++ b/tools/lvm.c
+@@ -186,7 +186,7 @@ int lvm_shell(struct cmd_context *cmd, struct cmdline_context *cmdline)
+ char *input = NULL, *args[MAX_ARGS], **argv;
+
+ rl_readline_name = "lvm";
+- rl_attempted_completion_function = (CPPFunction *) _completion;
++ rl_attempted_completion_function = (rl_completion_func_t *) _completion;
+
+ _read_history(cmd);
+
+--
+1.9.1
+
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [meta-oe v2] lvm2: replace CPPFunction with rl_completion_func_t to fix build error
2014-03-26 12:22 [meta-oe v2] lvm2: replace CPPFunction with rl_completion_func_t to fix build error Zhenhua Luo
@ 2014-03-27 8:04 ` Robert Yang
0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2014-03-27 8:04 UTC (permalink / raw)
To: openembedded-devel; +Cc: b40527
On 03/26/2014 08:22 PM, Zhenhua Luo wrote:
> 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>
> ---
> meta-oe/recipes-support/lvm2/lvm2.inc | 1 +
> ...ace-CPPFunction-with-rl_completion_func_t.patch | 33 ++++++++++++++++++++++
> 2 files changed, 34 insertions(+)
> create mode 100644 meta-oe/recipes-support/lvm2/lvm2/0001-Replace-CPPFunction-with-rl_completion_func_t.patch
>
> diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
> index c2e1007..4b43328 100644
> --- a/meta-oe/recipes-support/lvm2/lvm2.inc
> +++ b/meta-oe/recipes-support/lvm2/lvm2.inc
> @@ -9,6 +9,7 @@ INC_PR = "r4"
>
> S = "${WORKDIR}/LVM2.${PV}"
> SRC_URI = "ftp://sources.redhat.com/pub/lvm2/old/LVM2.${PV}.tgz \
> + file://0001-Replace-CPPFunction-with-rl_completion_func_t.patch \
> file://lvm.conf"
>
> 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 0000000..98c21fd
> --- /dev/null
> +++ b/meta-oe/recipes-support/lvm2/lvm2/0001-Replace-CPPFunction-with-rl_completion_func_t.patch
> @@ -0,0 +1,33 @@
> +From e2484e179c389b98366c8b66b451d9d2ba8f35e8 Mon Sep 17 00:00:00 2001
> +From: Zhenhua Luo <zhenhua.luo@freescale.com>
> +Date: Tue, 25 Mar 2014 17:39:43 +0800
> +Subject: [PATCH] Replace CPPFunction with rl_completion_func_t
> +
> +lvm2 depends on readline, CPPFunction has been replaced by rl_completion_func_t
> +in recent readline,
> +
> +Upstream-Status: Inappropriate [configuration]
Maybe the Upstream-Status should be "Pending" ?
The patch works well for me.
Tested-by: Robert Yang <liezhi.yang@windriver.com>
// Robert
> +The change depends on the build environment, it is required by OpenEmbedded env
> +due to readline upgrade.
> +
> +Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
> +---
> + tools/lvm.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/tools/lvm.c b/tools/lvm.c
> +index e002a76..5fa35d2 100644
> +--- a/tools/lvm.c
> ++++ b/tools/lvm.c
> +@@ -186,7 +186,7 @@ int lvm_shell(struct cmd_context *cmd, struct cmdline_context *cmdline)
> + char *input = NULL, *args[MAX_ARGS], **argv;
> +
> + rl_readline_name = "lvm";
> +- rl_attempted_completion_function = (CPPFunction *) _completion;
> ++ rl_attempted_completion_function = (rl_completion_func_t *) _completion;
> +
> + _read_history(cmd);
> +
> +--
> +1.9.1
> +
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-27 8:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-26 12:22 [meta-oe v2] lvm2: replace CPPFunction with rl_completion_func_t to fix build error Zhenhua Luo
2014-03-27 8:04 ` Robert Yang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.