[bullet/f15/master] - Fix gcc 4.6 build error

rmattes rmattes at fedoraproject.org
Sun Feb 20 02:58:01 UTC 2011


commit d73ac5a289d0fbf672e386f7f895de966ade44c3
Author: Rich Mattes <richmattes at gmail.com>
Date:   Sat Feb 19 21:55:12 2011 -0500

    - Fix gcc 4.6 build error

 bullet-2.77-zero_initialize.patch |   23 +++++++++++++++++++++++
 bullet.spec                       |    5 +++++
 2 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/bullet-2.77-zero_initialize.patch b/bullet-2.77-zero_initialize.patch
new file mode 100644
index 0000000..c9db2fb
--- /dev/null
+++ b/bullet-2.77-zero_initialize.patch
@@ -0,0 +1,23 @@
+Index: src/BulletSoftBody/btSoftBodyInternals.h
+===================================================================
+--- src/BulletSoftBody/btSoftBodyInternals.h	(revision 2286)
++++ src/BulletSoftBody/btSoftBodyInternals.h	(working copy)
+@@ -25,7 +25,7 @@
+ #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+ #include "BulletCollision/CollisionShapes/btConvexInternalShape.h"
+ #include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h"
+-
++#include <string.h> //for memset
+ //
+ // btSymMatrix
+ //
+@@ -172,8 +172,7 @@
+ template <typename T>
+ static inline void			ZeroInitialize(T& value)
+ {
+-	static const T	zerodummy;
+-	value=zerodummy;
++	memset(&value,0,sizeof(T));
+ }
+ //
+ template <typename T>
diff --git a/bullet.spec b/bullet.spec
index d2d2741..f6b9c0c 100644
--- a/bullet.spec
+++ b/bullet.spec
@@ -16,6 +16,7 @@ Source1: generate-tarball.sh
 
 Patch1: %{name}-2.77-extras-version.patch
 Patch2: %{name}-2.77-lib.patch
+Patch3: %{name}-2.77-zero_initialize.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -63,6 +64,7 @@ Development headers and libraries for %{name} extra libraries.
 #%patch0 -p1 -b .version
 %patch1 -p1 -b .extras-version
 %patch2 -p1 -b .lib
+%patch3 -p0
 
 # Set these files to right permission
 chmod 644 src/LinearMath/btPoolAllocator.h
@@ -158,6 +160,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Sat Feb 19 2011 Rich Mattes <richmattes at gmail.com> - 2.77-4
+- Fix gcc 4.6 build error
+
 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.77-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list