dev-db/firebird: Fix building with GCC-6
authorPeter Levine <plevine457@gmail.com>
Wed, 26 Jul 2017 02:27:16 +0000 (22:27 -0400)
committerAndreas Sturmlechner <asturm@gentoo.org>
Fri, 10 Nov 2017 20:34:03 +0000 (21:34 +0100)
Closes: https://bugs.gentoo.org/608294
Closes: https://github.com/gentoo/gentoo/pull/5212
Package-Manager: Portage-2.3.6, Repoman-2.3.2

dev-db/firebird/files/firebird-2.5.7.27050.0-gcc6.patch [new file with mode: 0644]
dev-db/firebird/firebird-2.5.7.27050.0.ebuild

diff --git a/dev-db/firebird/files/firebird-2.5.7.27050.0-gcc6.patch b/dev-db/firebird/files/firebird-2.5.7.27050.0-gcc6.patch
new file mode 100644 (file)
index 0000000..f051ea0
--- /dev/null
@@ -0,0 +1,35 @@
+Bug: https://bugs.gentoo.org/608294
+PR: https://github.com/FirebirdSQL/firebird/pull/104
+
+--- a/src/common/classes/alloc.h
++++ b/src/common/classes/alloc.h
+@@ -498,10 +498,14 @@ using Firebird::MemoryPool;
+
+ inline static MemoryPool* getDefaultMemoryPool() { return Firebird::MemoryPool::processMemoryPool; }
+
++#if (( ! __GNUC__ ) || ( __GNUC__ < 6 ))
++
+ // Global versions of operators new and delete
+ void* operator new(size_t s) THROW_BAD_ALLOC;
+ void* operator new[](size_t s) THROW_BAD_ALLOC;
+
++#endif
++
+ void operator delete(void* mem) throw();
+ void operator delete[](void* mem) throw();
+
+--- a/src/dudley/exe.epp
++++ b/src/dudley/exe.epp
+@@ -2884,9 +2884,9 @@ static USHORT get_prot_mask( const TEXT * relation, TEXT * field)
+               blr_parameter, 0, 0, 0,
+               blr_parameter, 0, 1, 0,
+               blr_parameter, 1, 0, 0,
+-              blr_end,
+-              blr_end,
+-              blr_end,
++              static_cast<SCHAR>(blr_end),
++              static_cast<SCHAR>(blr_end),
++              static_cast<SCHAR>(blr_end),
+               blr_eoc
+       };
+       static FB_API_HANDLE req_handle;
\ No newline at end of file
index b118e34f5f201728ff9f46ab343a4cf44321cdf8..b6e56990fd82b7b07ff1b14dcdff43c17c4c3dde 100644 (file)
@@ -35,7 +35,10 @@ RDEPEND="${CDEPEND}
 
 RESTRICT="userpriv"
 
-PATCHES=( "${FILESDIR}"/${PN}-2.5.3.26780.0-deps-flags.patch )
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.5.3.26780.0-deps-flags.patch
+       "${FILESDIR}"/${P}-gcc6.patch
+)
 
 S="${WORKDIR}/${MY_P}"