mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-08 22:52:59 -04:00
games-action/blackvoxel: add upstream patch: strict aliasing
Signed-off-by: Samuel Bauer <samuel.bauer@yahoo.fr>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit desktop flag-o-matic toolchain-funcs xdg
|
||||
inherit desktop toolchain-funcs xdg
|
||||
|
||||
DESCRIPTION="Blackvoxel Video Game"
|
||||
HOMEPAGE="https://www.blackvoxel.com/"
|
||||
@@ -29,14 +29,9 @@ S="${WORKDIR}/${PN}_source_${PV//./_}"
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-makefile.patch
|
||||
"${FILESDIR}"/${P}-savedir.patch
|
||||
"${FILESDIR}"/${P}-strict-aliasing.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
append-cflags -fno-strict-aliasing
|
||||
append-cxxflags -fno-strict-aliasing
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export CXX="$(tc-getCXX)"
|
||||
export CC="$(tc-getCC)"
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
diff --git a/src/ZVoxelType_Concrete.cpp b/src/ZVoxelType_Concrete.cpp
|
||||
index 19a95ad..768e094 100644
|
||||
--- a/src/ZVoxelType_Concrete.cpp
|
||||
+++ b/src/ZVoxelType_Concrete.cpp
|
||||
@@ -37,10 +37,17 @@
|
||||
|
||||
ZVoxelExtension * ZVoxelType_Concrete::CreateVoxelExtension(bool IsLoadingPhase)
|
||||
{
|
||||
- float Pressure = 0.0;
|
||||
- ZMemSize Ms = *((ULong *)&Pressure);
|
||||
+ union
|
||||
+ {
|
||||
+ float Pressure;
|
||||
+ ZVoxelExtension * Extension;
|
||||
+ };
|
||||
+
|
||||
+ Extension = 0;
|
||||
+ Pressure = 0.0;
|
||||
+
|
||||
+ return( Extension );
|
||||
|
||||
- return( (ZVoxelExtension *)Ms);
|
||||
}
|
||||
|
||||
void ZVoxelType_Concrete::GetBlockInformations(ZVoxelLocation * DestLocation, ZString & Infos)
|
||||
Reference in New Issue
Block a user