Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
xye: fix build with libc++ 19
To:
ports@openbsd.org
Cc:
bcallah@openbsd.org
Date:
Wed, 27 Aug 2025 22:08:21 +0200

Download raw body.

Thread
disambiguate lock to avoid

src/xye_script.cpp:862:5: error: reference to 'lock' is ambiguous
  862 |     lock* bc=new lock(game::SquareN(LastX,LastY),c)

Index: Makefile
===================================================================
RCS file: /cvs/ports/games/xye/Makefile,v
diff -u -p -r1.14 Makefile
--- Makefile	7 Nov 2023 14:19:32 -0000	1.14
+++ Makefile	27 Aug 2025 20:00:15 -0000
@@ -11,7 +11,7 @@ PERMIT_PACKAGE =	Yes
 
 SITES =		${SITE_SOURCEFORGE:=xye/}
 
-FIX_CRLF_FILES =	src/xsb_level.cpp
+FIX_CRLF_FILES =	src/xsb_level.cpp src/xye_script.cpp
 
 WANTLIB += SDL SDL_image SDL_ttf c m pthread ${COMPILER_LIBCXX}
 
Index: patches/patch-src_xye_script_cpp
===================================================================
RCS file: patches/patch-src_xye_script_cpp
diff -N patches/patch-src_xye_script_cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_xye_script_cpp	27 Aug 2025 20:02:44 -0000
@@ -0,0 +1,12 @@
+Index: src/xye_script.cpp
+--- src/xye_script.cpp.orig
++++ src/xye_script.cpp
+@@ -859,7 +859,7 @@ void Load_Lock(TiXmlElement* el)
+         el->QueryIntAttribute("x",&LastX);
+         el->QueryIntAttribute("y",&LastY);
+         blockcolor c=GetElementBlockColor(el);
+-    lock* bc=new lock(game::SquareN(LastX,LastY),c);
++    ::lock* bc=new ::lock(game::SquareN(LastX,LastY),c);
+ }
+ 
+ /* Load Key*/