summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-astronomy/celestia/files/celestia-1.4.1-strictalias.patch')
-rw-r--r--sci-astronomy/celestia/files/celestia-1.4.1-strictalias.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/sci-astronomy/celestia/files/celestia-1.4.1-strictalias.patch b/sci-astronomy/celestia/files/celestia-1.4.1-strictalias.patch
new file mode 100644
index 000000000000..3ff59b31686a
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.4.1-strictalias.patch
@@ -0,0 +1,13 @@
+--- celestia-1.4.1/src/celengine/modelfile.cpp.strictalias 2006-11-22 14:04:15.000000000 +0100
++++ celestia-1.4.1/src/celengine/modelfile.cpp 2006-11-22 14:01:27.000000000 +0100
+@@ -1080,7 +1080,9 @@
+ static float readFloat(istream& in)
+ {
+ int i = readUint(in);
+- return *((float*) &i);
++ float f;
++ memcpy(&f, &i, sizeof(float));
++ return f;
+ }
+
+