Skip to content

Commit

Permalink
dev-libs/mimetic: backport patch from upstream solving build failure
Browse files Browse the repository at this point in the history
Thanks-to: Daniel Sunnerer <[email protected]>
Closes: https://bugs.gentoo.org/729910
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Michael Palimaka <[email protected]>
  • Loading branch information
Michael Palimaka committed Apr 20, 2021
1 parent e9ce320 commit f206ad5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
22 changes: 22 additions & 0 deletions dev-libs/mimetic/files/mimetic-0.9.8-build-mmap.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From bf84940f9021950c80846e6b1a5f8b0b55991b00 Mon Sep 17 00:00:00 2001
From: Stefano Barbato <[email protected]>
Date: Sat, 27 Apr 2019 15:00:58 +0200
Subject: [PATCH] better mmap error check

---
mimetic/os/mmfile.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mimetic/os/mmfile.cxx b/mimetic/os/mmfile.cxx
index dfc95b7..9627516 100644
--- a/mimetic/os/mmfile.cxx
+++ b/mimetic/os/mmfile.cxx
@@ -57,7 +57,7 @@ bool MMFile::open(int mode)
bool MMFile::map()
{
m_beg = (char*) mmap(0, m_st.st_size, PROT_READ, MAP_SHARED,m_fd,0);
- if(m_beg > 0)
+ if(m_beg != MAP_FAILED)
{
m_end = m_beg + m_st.st_size;
#if HAVE_MADVISE
5 changes: 4 additions & 1 deletion dev-libs/mimetic/mimetic-0.9.8.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ IUSE="doc examples"

BDEPEND="doc? ( app-doc/doxygen )"

PATCHES=( "${FILESDIR}/signed-char.patch" )
PATCHES=(
"${FILESDIR}/signed-char.patch"
"${FILESDIR}/${P}-build-mmap.patch"
)

src_prepare() {
default
Expand Down

0 comments on commit f206ad5

Please sign in to comment.