[PATCH v4 11/12] multipathd: fix incompatible pointer type error with libedit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Martin Wilck <mwilck@xxxxxxxx>

Versions of libedit prior to 2016 were using a wrong prototype for
rl_completion_entry_function in readline.h. Internally, libedit casts this to
the correct type (char *)(*)(const char *, int) (aka CPFunction in libedit).
So we simply cast to the wrong prototype here.

See http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/readline/readline.h.diff?r1=1.34&r2=1.35

Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
Reviewed-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx>
---
 multipathd/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/multipathd/Makefile b/multipathd/Makefile
index 8a56304..28ebdc0 100644
--- a/multipathd/Makefile
+++ b/multipathd/Makefile
@@ -34,6 +34,10 @@ endif
 ifeq ($(READLINE),libreadline)
 RL_CPPFLAGS += -DUSE_LIBREADLINE
 RL_LIBDEPS += -lreadline
+# See comment in uxclnt.c
+ifeq ($(shell sed -En 's/.*\<Function\s*\*rl_completion_entry_function;.*/yes/p' /usr/include/editline/readline.h),yes)
+RL_CPPFLAGS += -DBROKEN_RL_COMPLETION_FUNC
+endif
 endif
 
 ifdef SYSTEMD
-- 
2.37.1

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux