diff options
Diffstat (limited to 'games-strategy/0ad/files/0ad-0.0.16_alpha-gcc-4.9.patch')
-rw-r--r-- | games-strategy/0ad/files/0ad-0.0.16_alpha-gcc-4.9.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/games-strategy/0ad/files/0ad-0.0.16_alpha-gcc-4.9.patch b/games-strategy/0ad/files/0ad-0.0.16_alpha-gcc-4.9.patch new file mode 100644 index 000000000000..5b17120b4f7b --- /dev/null +++ b/games-strategy/0ad/files/0ad-0.0.16_alpha-gcc-4.9.patch @@ -0,0 +1,42 @@ +Index: /ps/trunk/source/lib/allocators/headerless.cpp +=================================================================== +--- /ps/trunk/source/lib/allocators/headerless.cpp (revision 15333) ++++ /ps/trunk/source/lib/allocators/headerless.cpp (revision 15334) +@@ -55,10 +55,12 @@ + } + +- FreedBlock(uintptr_t id, size_t size) +- : m_magic(s_magic), m_size(size), m_id(id) +- { +- } +- +- ~FreedBlock() ++ void Setup(uintptr_t id, size_t size) ++ { ++ m_magic = s_magic; ++ m_size = size; ++ m_id = id; ++ } ++ ++ void Reset() + { + // clear all fields to prevent accidental reuse +@@ -411,6 +413,7 @@ + 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++; +@@ -431,6 +434,6 @@ + + FreedBlock* footer = Footer(freedBlock); +- freedBlock->~FreedBlock(); +- footer->~FreedBlock(); ++ freedBlock->Reset(); ++ footer->Reset(); + } + |