From 335001b6ec498072a14a532f4b14a901aee50e5309a5af7901f2ab3923094775 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 3 Nov 2023 09:53:38 +0000 Subject: [PATCH] - Add more-32bit.patch OBS-URL: https://build.opensuse.org/package/show/games/gzdoom?expand=0&rev=102 --- gzdoom.changes | 1 + gzdoom.spec | 1 + more-32bit.patch | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 more-32bit.patch diff --git a/gzdoom.changes b/gzdoom.changes index 091e665..ecb80f8 100644 --- a/gzdoom.changes +++ b/gzdoom.changes @@ -15,6 +15,7 @@ Fri Oct 27 04:20:10 UTC 2023 - Jan Engelhardt setting. * Lots of new ZScript features. - Delete gzdoom-vulkan.patch, gcc13.diff +- Add more-32bit.patch ------------------------------------------------------------------- Thu Mar 30 22:02:53 UTC 2023 - Jan Engelhardt diff --git a/gzdoom.spec b/gzdoom.spec index 0230206..9b93e84 100644 --- a/gzdoom.spec +++ b/gzdoom.spec @@ -32,6 +32,7 @@ Patch6: gzdoom-discord.patch Patch8: 0001-removed-some-32bit-only-CMake-code.patch Patch9: 0001-Revert-use-static_assert-to-make-32-bit-builds-fail.patch Patch10: 0001-Revert-Switch-to-miniz-from-zlib.patch +Patch11: more-32bit.patch BuildRequires: cmake >= 2.8.7 BuildRequires: discord-rpc-devel BuildRequires: gcc-c++ diff --git a/more-32bit.patch b/more-32bit.patch new file mode 100644 index 0000000..aa94961 --- /dev/null +++ b/more-32bit.patch @@ -0,0 +1,27 @@ +From: Jan Engelhardt +Date: 2023-11-03 10:46:06.423636287 +0100 + +VkSurfaceKHR is an alias to `struct something *` on 64-bit platforms, but to +`uint64_t` on 32-bit. Using {} will clear it without running into a type error: + +[ 88s] sdlglvideo.cpp:294:54: error: cannot convert 'std::nullptr_t' to +'VkSurfaceKHR' {aka 'long long unsigned int'} in initialization +[ 88s] 294 | VkSurfaceKHR surfacehandle = nullptr; + +--- + src/common/platform/posix/sdl/sdlglvideo.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: gzdoom-g4.11.3/src/common/platform/posix/sdl/sdlglvideo.cpp +=================================================================== +--- gzdoom-g4.11.3.orig/src/common/platform/posix/sdl/sdlglvideo.cpp ++++ gzdoom-g4.11.3/src/common/platform/posix/sdl/sdlglvideo.cpp +@@ -291,7 +291,7 @@ DFrameBuffer *SDLVideo::CreateFrameBuffe + builder.RequireExtension(names[i]); + auto instance = builder.Create(); + +- VkSurfaceKHR surfacehandle = nullptr; ++ VkSurfaceKHR surfacehandle = {}; + if (!I_CreateVulkanSurface(instance->Instance, &surfacehandle)) + VulkanError("I_CreateVulkanSurface failed"); +