File fix-riscv64-build.patch of Package 0ad

diff --git a/build/premake/premake5.lua b/build/premake/premake5.lua
--- a/build/premake/premake5.lua
+++ b/build/premake/premake5.lua
@@ -1120,6 +1120,11 @@
 			linkoptions { "-pthread" }
 		end
 
+		-- DWCAS support on riscv64 platform
+		if arch == "riscv64" then
+			links { "atomic" }
+		end
+
 		-- For debug_resolve_symbol
 		filter "Debug"
 			linkoptions { "-rdynamic" }
@@ -1505,6 +1510,11 @@
 			linkoptions { "-pthread" }
 		end
 
+		-- DWCAS support on riscv64 platform
+		if arch == "riscv64" then
+			links { "atomic" }
+		end
+
 		-- For debug_resolve_symbol
 		filter "Debug"
 			linkoptions { "-rdynamic" }
openSUSE Build Service is sponsored by