dopewars: fix build with gcc15 (#508805)
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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;
|
||||
@@ -34,8 +34,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
ncurses
|
||||
];
|
||||
|
||||
# remove the denied setting of setuid bit permission
|
||||
patches = [ ./0001-remove_setuid.patch ];
|
||||
patches = [
|
||||
# remove the denied setting of setuid bit permission
|
||||
./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 = ''
|
||||
|
||||
Reference in New Issue
Block a user