aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-12-06 20:53:39 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-12-07 15:34:04 +0000
commitde5264ca78f41c04c1753ca94d949121b53b9f1d (patch)
tree2430b748c087bc86544ed94ac1827ea6596d2799
parentd3fa0778aa2b7be154a88533a181c2efce5208ef (diff)
downloadports-de5264ca78f41c04c1753ca94d949121b53b9f1d.tar.gz
ports-de5264ca78f41c04c1753ca94d949121b53b9f1d.zip
mail/mutt: fix build with clang 15
During an exp-run for llvm 15 (see bug 265425), it turned out that mail/mutt failed to build with clang (and lld) 15: --- init.o --- In file included from init.c:43: ./init.h:3166:37: error: incompatible integer to pointer conversion initializing 'void *' with an expression of type 'int' [-Wint-conversion] { "quote_empty", DT_BOOL, R_NONE, OPTQUOTEEMPTY, 1 }, ^~~~~~~~~~~~~ ./init.h:3166:37: warning: suggest braces around initialization of subobject [-Wmissing-braces] { "quote_empty", DT_BOOL, R_NONE, OPTQUOTEEMPTY, 1 }, ^~~~~~~~~~~~~ { } ./init.h:3166:52: error: incompatible integer to pointer conversion initializing 'void *' with an expression of type 'int' [-Wint-conversion] { "quote_empty", DT_BOOL, R_NONE, OPTQUOTEEMPTY, 1 }, ^ ./init.h:3166:52: warning: suggest braces around initialization of subobject [-Wmissing-braces] { "quote_empty", DT_BOOL, R_NONE, OPTQUOTEEMPTY, 1 }, ^ This is because the QUOTE_PATCH option is on by default, and that quote patch does not properly initialize the union members for the MuttVars variable. PR: 268208 Approved by: dereks@lifeofadishwasher.com (maintainer) MFH: 2022Q4
-rw-r--r--mail/mutt/Makefile1
-rw-r--r--mail/mutt/files/extra-patch-quote18
2 files changed, 19 insertions, 0 deletions
diff --git a/mail/mutt/Makefile b/mail/mutt/Makefile
index 30e700b51515..b9e02a9a8c0e 100644
--- a/mail/mutt/Makefile
+++ b/mail/mutt/Makefile
@@ -173,6 +173,7 @@ NLS_CONFIGURE_ENABLE= nls
QUOTE_PATCH_PATCHFILES= patch-${VVV_PATCH_VERSION}.vvv.initials.xz:vvv \
mutt-${GREETING_PATCH_VERSION}.vvv.quote:vc
+QUOTE_PATCH_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-quote
REVERSE_REPLY_PATCH_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-reverse_reply
diff --git a/mail/mutt/files/extra-patch-quote b/mail/mutt/files/extra-patch-quote
new file mode 100644
index 000000000000..33dc9010ae03
--- /dev/null
+++ b/mail/mutt/files/extra-patch-quote
@@ -0,0 +1,18 @@
+--- init.h.orig 2022-09-14 14:12:12 UTC
++++ init.h
+@@ -3163,13 +3163,13 @@ struct option_t MuttVars[] = {
+ ** have no effect, and if it is set to \fIask-yes\fP or \fIask-no\fP, you are
+ ** prompted for confirmation when you try to quit.
+ */
+- { "quote_empty", DT_BOOL, R_NONE, OPTQUOTEEMPTY, 1 },
++ { "quote_empty", DT_BOOL, R_NONE, {.l=OPTQUOTEEMPTY}, {.l=1} },
+ /*
+ ** .pp
+ ** Controls whether or not empty lines will be quoted using
+ ** ``$indent_string''.
+ */
+- { "quote_quoted", DT_BOOL, R_NONE, OPTQUOTEQUOTED, 0 },
++ { "quote_quoted", DT_BOOL, R_NONE, {.l=OPTQUOTEQUOTED}, {.l=0} },
+ /*
+ ** .pp
+ ** Controls how quoted lines will be quoted. If set, one quote