corewars: repair build with llvm 22

Fix an invalid GTK+2 cast and correct what looks like an operator
precedence bug.
This commit is contained in:
daniel
2026-06-08 21:56:16 +00:00
parent 565b1f76a0
commit 190805a3c4
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
COMMENT= computer simulation game
DISTNAME= corewars-0.9.13
REVISION= 11
REVISION= 12
CATEGORIES= games x11
@@ -14,7 +14,7 @@ WANTLIB += X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama
WANTLIB += Xrandr Xrender atk-1.0 c cairo fontconfig freetype
WANTLIB += gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0
WANTLIB += gtk-x11-2.0 harfbuzz intl m pango-1.0 pangocairo-1.0
WANTLIB += pangoft2-1.0 z
WANTLIB += pangoft2-1.0
LIB_DEPENDS= x11/gtk+2
+2 -2
View File
@@ -85,8 +85,8 @@
+ int c;
+ char *p;
+
+ while (c = getopt(argc, argv,
+ "Hl:s:m:t:e:z:yd:r:ia:c:k:onbxf:hpg") != -1)
+ while ((c = getopt(argc, argv,
+ "Hl:s:m:t:e:z:yd:r:ia:c:k:onbxf:hpg")) != -1)
+ switch(c) {
+ case 'l':
+ if (strcmp(optarg, "COREWARS") == 0)
+1 -1
View File
@@ -8,7 +8,7 @@ From Debian's corewars_0.9.13+ds-1.diff.
/* Attach the new accelerator group to the window. */
- gtk_accel_group_attach (accel_group, GTK_OBJECT (window));
+ gtk_window_add_accel_group(GTK_OBJECT (window), accel_group);
+ gtk_window_add_accel_group(GTK_WINDOW (window), accel_group);
menu_file_start = gtk_item_factory_get_widget (item_factory, "/File/Start");
menu_file_pause = gtk_item_factory_get_widget (item_factory, "/File/Pause");