[dm-devel] [PATCH v4 11/12] multipathd: fix incompatible pointer type error with libedit
mwilck at suse.com
mwilck at suse.com
Tue Aug 30 19:27:12 UTC 2022
From: Martin Wilck <mwilck at suse.com>
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 at suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins at redhat.com>
---
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
More information about the dm-devel
mailing list