Unverified Commit 2e89bc7d authored by Nikolay Korotkiy's avatar Nikolay Korotkiy Committed by GitHub
Browse files

dopewars: fix build with gcc15 (#508805)

parents bf35438a 312e4af5
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
diff --git a/src/gtkport/itemfactory.c b/src/gtkport/itemfactory.c
index b7a8c3f..980682c 100644
--- a/src/gtkport/itemfactory.c
+++ b/src/gtkport/itemfactory.c
@@ -217,7 +217,7 @@ void dp_gtk_item_factory_create_item(DPGtkItemFactory *ifactory,
   new_child->widget = menu_item;
   if (entry->callback) {
     g_signal_connect(G_OBJECT(menu_item), "activate",
-                     entry->callback, callback_data);
+                     G_CALLBACK(entry->callback), callback_data);
   }
 
   if (parent) {
diff --git a/src/gtkport/itemfactory.h b/src/gtkport/itemfactory.h
index a1d5b1d..2702595 100644
--- a/src/gtkport/itemfactory.h
+++ b/src/gtkport/itemfactory.h
@@ -59,7 +59,7 @@ GtkItemFactory *dp_gtk_item_factory_new(const gchar *path,
 
 typedef gchar *(*DPGtkTranslateFunc) (const gchar *path, gpointer func_data);
 
-typedef void (*DPGtkItemFactoryCallback) ();
+typedef void (*DPGtkItemFactoryCallback) (GtkWidget *widget, gpointer data);
 
 typedef struct _DPGtkItemFactoryEntry DPGtkItemFactoryEntry;
 typedef struct _DPGtkItemFactory DPGtkItemFactory;
+6 −2
Original line number Diff line number Diff line
@@ -34,8 +34,12 @@ stdenv.mkDerivation (finalAttrs: {
    ncurses
  ];

  patches = [
    # remove the denied setting of setuid bit permission
  patches = [ ./0001-remove_setuid.patch ];
    ./0001-remove_setuid.patch
    # fix compilation errors with gcc15
    ./0002-fix_gcc15.patch
  ];

  # run dopewars with -f so that it finds its scoreboard file in ~/.local/share
  postInstall = ''