r15128 - in packages/trunk/0ad/debian: . patches

Vincent Cheng vcheng at moszumanska.debian.org
Wed Jun 25 04:30:37 UTC 2014


Author: vcheng
Date: 2014-06-25 04:29:56 +0000 (Wed, 25 Jun 2014)
New Revision: 15128

Added:
   packages/trunk/0ad/debian/patches/fix_gcc4.9_ftbfs.patch
Modified:
   packages/trunk/0ad/debian/changelog
   packages/trunk/0ad/debian/patches/series
Log:
0ad: Fix FTBFS with gcc 4.9


Modified: packages/trunk/0ad/debian/changelog
===================================================================
--- packages/trunk/0ad/debian/changelog	2014-06-12 03:24:36 UTC (rev 15127)
+++ packages/trunk/0ad/debian/changelog	2014-06-25 04:29:56 UTC (rev 15128)
@@ -1,3 +1,10 @@
+0ad (0.0.16-4) unstable; urgency=medium
+
+  * Add debian/patches/fix_gcc4.9_ftbfs.patch to fix FTBFS when running the
+    test suite when built with gcc 4.9. (Closes: #746822)
+
+ -- Vincent Cheng <vcheng at debian.org>  Tue, 24 Jun 2014 21:21:36 -0700
+
 0ad (0.0.16-3) unstable; urgency=medium
 
   * Add debian/patches/support_miniupnpc_1.9.patch to fix FTBFS when built

Added: packages/trunk/0ad/debian/patches/fix_gcc4.9_ftbfs.patch
===================================================================
--- packages/trunk/0ad/debian/patches/fix_gcc4.9_ftbfs.patch	                        (rev 0)
+++ packages/trunk/0ad/debian/patches/fix_gcc4.9_ftbfs.patch	2014-06-25 04:29:56 UTC (rev 15128)
@@ -0,0 +1,43 @@
+--- a/source/lib/allocators/headerless.cpp
++++ b/source/lib/allocators/headerless.cpp
+@@ -54,12 +54,14 @@
+ 	{
+ 	}
+ 
+-	FreedBlock(uintptr_t id, size_t size)
+-		:  m_magic(s_magic), m_size(size), m_id(id)
++	void Setup(uintptr_t id, size_t size)
+ 	{
++		m_magic = s_magic;
++		m_size = size;
++		m_id = id;
+ 	}
+ 
+-	~FreedBlock()
++	void Reset()
+ 	{
+ 		// clear all fields to prevent accidental reuse
+ 		prev = next = 0;
+@@ -410,8 +412,9 @@
+ 
+ 	FreedBlock* WriteTags(u8* p, size_t size)
+ 	{
+-		FreedBlock* freedBlock = new(p) FreedBlock(s_headerId, size);
+-		(void)new(Footer(freedBlock)) FreedBlock(s_footerId, size);
++		FreedBlock* freedBlock = (FreedBlock*)p;
++		freedBlock->Setup(s_headerId, size);
++		Footer(freedBlock)->Setup(s_footerId, size);
+ 
+ 		m_freeBlocks++;
+ 		m_freeBytes += size;
+@@ -430,8 +433,8 @@
+ 		m_freeBytes -= freedBlock->Size();
+ 
+ 		FreedBlock* footer = Footer(freedBlock);
+-		freedBlock->~FreedBlock();
+-		footer->~FreedBlock();
++		freedBlock->Reset();
++		footer->Reset();
+ 	}
+ 
+ 	FreedBlock* PrecedingBlock(u8* p, u8* beginningOfPool) const

Modified: packages/trunk/0ad/debian/patches/series
===================================================================
--- packages/trunk/0ad/debian/patches/series	2014-06-12 03:24:36 UTC (rev 15127)
+++ packages/trunk/0ad/debian/patches/series	2014-06-25 04:29:56 UTC (rev 15128)
@@ -1,2 +1,3 @@
 enable-hardening-relro.patch
 support_miniupnpc_1.9.patch
+fix_gcc4.9_ftbfs.patch




More information about the Pkg-games-commits mailing list