Unverified Commit ee685995 authored by Yohann Boniface's avatar Yohann Boniface Committed by GitHub
Browse files

mcabber: fix compilation with GCC15 by correcting function prototypes (#476382)

parents 18b86c11 0815f32b
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
GCC 15 uses C23 by default which is stricter about function prototypes.

diff -r -U3 mcabber-1.1.2.orig/mcabber/screen.c mcabber-1.1.2/mcabber/screen.c
--- mcabber-1.1.2.orig/mcabber/screen.c	2026-01-02 22:48:11.169262178 +0100
+++ mcabber-1.1.2/mcabber/screen.c	2026-01-02 22:51:01.428023634 +0100
@@ -90,7 +90,7 @@
                            const gchar *message, gpointer user_data);
 
 #ifdef XEP0085
-static gboolean scr_chatstates_timeout();
+static gboolean scr_chatstates_timeout(gpointer user_data);
 #endif
 
 #if defined(WITH_ENCHANT) || defined(WITH_ASPELL)
@@ -2485,7 +2485,7 @@
 }
 
 #ifdef XEP0085
-static gboolean scr_chatstates_timeout(void)
+static gboolean scr_chatstates_timeout(gpointer user_data)
 {
   time_t now;
   time(&now);
diff -r -U3 mcabber-1.1.2.orig/mcabber/xmpp.c mcabber-1.1.2/mcabber/xmpp.c
--- mcabber-1.1.2.orig/mcabber/xmpp.c	2026-01-02 22:48:11.166975512 +0100
+++ mcabber-1.1.2/mcabber/xmpp.c	2026-01-02 22:52:30.355029495 +0100
@@ -50,7 +50,7 @@
 static guint AutoConnection;
 
 inline void update_last_use(void);
-inline gboolean xmpp_reconnect();
+inline gboolean xmpp_reconnect(gpointer user_data);
 
 enum imstatus mystatus = offline;
 static enum imstatus mywantedstatus = available;
@@ -781,7 +781,7 @@
     scr_LogPrint(LPRINT_LOGNORM, "Authentication failed");
 }
 
-gboolean xmpp_reconnect()
+gboolean xmpp_reconnect(gpointer user_data)
 {
   if (!lconnection)
     xmpp_connect();
+1 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ stdenv.mkDerivation rec {
      sha256 = "01bc23z0mva9l9jv587sq2r9w3diachgkmb9ad99hlzgj02fmq4v";
      stripLen = 1;
    })
    ./add-missing-arguments-to-function-prototypes.patch
  ];

  nativeBuildInputs = [ pkg-config ];