From c3db4946b21b377b353a9c88da6135979ac94e94 Mon Sep 17 00:00:00 2001 From: Alvar Penning Date: Tue, 1 Apr 2025 21:05:49 +0200 Subject: [PATCH] perl: fix build when multiplicity is not available Building WeeChat 4.6.0 on OpenBSD failed with the following error. > /usr/ports/pobj/weechat-4.6.0/weechat-4.6.0/src/plugins/perl/weechat-perl.c:356:13: error: expected ')' > function) < 0) > ^ > /usr/ports/pobj/weechat-4.6.0/weechat-4.6.0/src/plugins/perl/weechat-perl.c:352:9: note: to match this '(' > if (weechat_asprintf ( > ^ > /usr/ports/pobj/weechat-4.6.0/weechat-4.6.0/src/plugins/perl/../weechat-plugin.h:1312:31: note: expanded from macro 'weechat_asprintf' > (weechat_plugin->asprintf)(__result, __fmt, ##__argz) On further inspection, the line in question was recently altered in 099e11d7b8bc17b94f7923d99dde005e0e1aa298, where a comma was forgotten in the else branch of the MULTIPLICITY ifdef. After adding the comma, WeeChat builds as usual. --- src/plugins/perl/weechat-perl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/perl/weechat-perl.c b/src/plugins/perl/weechat-perl.c index eac7f6642..8710066d2 100644 --- a/src/plugins/perl/weechat-perl.c +++ b/src/plugins/perl/weechat-perl.c @@ -352,7 +352,7 @@ weechat_perl_exec (struct t_plugin_script *script, if (weechat_asprintf ( &func, "%s::%s", - (char *) ((script->interpreter) ? script->interpreter : perl_main) + (char *) ((script->interpreter) ? script->interpreter : perl_main), function) < 0) { return NULL;