FreeBSD Bugzilla – Attachment 242895 Details for
Bug 272103
net-im/libpurple: fix build with clang 16
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
net-im/libpurple: fix build with clang 16
net-im__libpurple-fix-clang16-build-1.diff (text/plain), 4.98 KB, created by
Dimitry Andric
on 2023-06-20 19:28:35 UTC
(
hide
)
Description:
net-im/libpurple: fix build with clang 16
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2023-06-20 19:28:35 UTC
Size:
4.98 KB
patch
obsolete
>commit 0d11c6979f3d73935dbdb9b9d0662d15691b2f78 >Author: Dimitry Andric <dim@FreeBSD.org> >Date: 2023-06-20 21:25:28 +0200 > > net-im/libpurple: fix build with clang 16 > > Clang 16 has a new error about incompatible function types, which shows > up when net-im/libpurple: > > auth_cyrus.c:376:23: error: incompatible function pointer types assigning to 'int (*)(void)' from 'int (void *, int, const char **, const char **)' [-Wincompatible-function-pointer-types] > js->sasl_cb[id].proc = jabber_sasl_cb_realm; > ^ ~~~~~~~~~~~~~~~~~~~~ > auth_cyrus.c:381:23: error: incompatible function pointer types assigning to 'int (*)(void)' from 'int (void *, int, const char **, unsigned int *)' [-Wincompatible-function-pointer-types] > js->sasl_cb[id].proc = jabber_sasl_cb_simple; > ^ ~~~~~~~~~~~~~~~~~~~~~ > auth_cyrus.c:386:23: error: incompatible function pointer types assigning to 'int (*)(void)' from 'int (void *, int, const char **, unsigned int *)' [-Wincompatible-function-pointer-types] > js->sasl_cb[id].proc = jabber_sasl_cb_simple; > ^ ~~~~~~~~~~~~~~~~~~~~~ > auth_cyrus.c:393:24: error: incompatible function pointer types assigning to 'int (*)(void)' from 'int (sasl_conn_t *, void *, int, sasl_secret_t **)' (aka 'int (struct sasl_conn *, void *, int, struct sasl_secret **)') [-Wincompatible-function-pointer-types] > js->sasl_cb[id].proc = jabber_sasl_cb_secret; > ^ ~~~~~~~~~~~~~~~~~~~~~ > auth_cyrus.c:399:23: error: incompatible function pointer types assigning to 'int (*)(void)' from 'int (void *, int, const char *)' [-Wincompatible-function-pointer-types] > js->sasl_cb[id].proc = jabber_sasl_cb_log; > ^ ~~~~~~~~~~~~~~~~~~ > > This is because the sasl headers declare the callback functions as > int(*)(void), even when the actual arguments actually different. Cast > the values assigned to the .proc fields to fix the warnings. > >diff --git a/net-im/libpurple/files/patch-libpurple_protocols_irc_msgs.c b/net-im/libpurple/files/patch-libpurple_protocols_irc_msgs.c >new file mode 100644 >index 000000000000..06ccf513a645 >--- /dev/null >+++ b/net-im/libpurple/files/patch-libpurple_protocols_irc_msgs.c >@@ -0,0 +1,29 @@ >+--- libpurple/protocols/irc/msgs.c.orig 2022-05-31 01:52:30 UTC >++++ libpurple/protocols/irc/msgs.c >+@@ -1622,22 +1622,22 @@ irc_msg_cap(struct irc_conn *irc, const char *name, co >+ irc->sasl_cb = g_new0(sasl_callback_t, 5); >+ >+ irc->sasl_cb[id].id = SASL_CB_AUTHNAME; >+- irc->sasl_cb[id].proc = irc_sasl_cb_simple; >++ irc->sasl_cb[id].proc = (int(*)(void))irc_sasl_cb_simple; >+ irc->sasl_cb[id].context = (void *)irc; >+ id++; >+ >+ irc->sasl_cb[id].id = SASL_CB_USER; >+- irc->sasl_cb[id].proc = irc_sasl_cb_simple; >++ irc->sasl_cb[id].proc = (int(*)(void))irc_sasl_cb_simple; >+ irc->sasl_cb[id].context = (void *)irc; >+ id++; >+ >+ irc->sasl_cb[id].id = SASL_CB_PASS; >+- irc->sasl_cb[id].proc = irc_sasl_cb_secret; >++ irc->sasl_cb[id].proc = (int(*)(void))irc_sasl_cb_secret; >+ irc->sasl_cb[id].context = (void *)irc; >+ id++; >+ >+ irc->sasl_cb[id].id = SASL_CB_LOG; >+- irc->sasl_cb[id].proc = irc_sasl_cb_log; >++ irc->sasl_cb[id].proc = (int(*)(void))irc_sasl_cb_log; >+ irc->sasl_cb[id].context = (void *)irc; >+ id++; >+ >diff --git a/net-im/libpurple/files/patch-libpurple_protocols_jabber_auth__cyrus.c b/net-im/libpurple/files/patch-libpurple_protocols_jabber_auth__cyrus.c >new file mode 100644 >index 000000000000..984396f6be74 >--- /dev/null >+++ b/net-im/libpurple/files/patch-libpurple_protocols_jabber_auth__cyrus.c >@@ -0,0 +1,38 @@ >+--- libpurple/protocols/jabber/auth_cyrus.c.orig 2021-12-21 02:44:53 UTC >++++ libpurple/protocols/jabber/auth_cyrus.c >+@@ -373,30 +373,30 @@ jabber_sasl_build_callbacks(JabberStream *js) >+ >+ id = 0; >+ js->sasl_cb[id].id = SASL_CB_GETREALM; >+- js->sasl_cb[id].proc = jabber_sasl_cb_realm; >++ js->sasl_cb[id].proc = (int(*)(void))jabber_sasl_cb_realm; >+ js->sasl_cb[id].context = (void *)js; >+ id++; >+ >+ js->sasl_cb[id].id = SASL_CB_AUTHNAME; >+- js->sasl_cb[id].proc = jabber_sasl_cb_simple; >++ js->sasl_cb[id].proc = (int(*)(void))jabber_sasl_cb_simple; >+ js->sasl_cb[id].context = (void *)js; >+ id++; >+ >+ js->sasl_cb[id].id = SASL_CB_USER; >+- js->sasl_cb[id].proc = jabber_sasl_cb_simple; >++ js->sasl_cb[id].proc = (int(*)(void))jabber_sasl_cb_simple; >+ js->sasl_cb[id].context = (void *)js; >+ id++; >+ >+ account = purple_connection_get_account(js->gc); >+ if (purple_account_get_password(account) != NULL ) { >+ js->sasl_cb[id].id = SASL_CB_PASS; >+- js->sasl_cb[id].proc = jabber_sasl_cb_secret; >++ js->sasl_cb[id].proc = (int(*)(void))jabber_sasl_cb_secret; >+ js->sasl_cb[id].context = (void *)js; >+ id++; >+ } >+ >+ js->sasl_cb[id].id = SASL_CB_LOG; >+- js->sasl_cb[id].proc = jabber_sasl_cb_log; >++ js->sasl_cb[id].proc = (int(*)(void))jabber_sasl_cb_log; >+ js->sasl_cb[id].context = (void*)js; >+ id++; >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 272103
: 242895