Skip to content

Commit

Permalink
dev-db/firebird: Fix building with GCC-6
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/608294
Closes: gentoo#5212
Package-Manager: Portage-2.3.6, Repoman-2.3.2
  • Loading branch information
Peter-Levine authored and a17r committed Nov 10, 2017
1 parent c59e381 commit e82963f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
35 changes: 35 additions & 0 deletions dev-db/firebird/files/firebird-2.5.7.27050.0-gcc6.patch
Original file line number Diff line number Diff line change
@@ -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;
5 changes: 4 additions & 1 deletion dev-db/firebird/firebird-2.5.7.27050.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down

0 comments on commit e82963f

Please sign in to comment.