diff options
author | Michael Palimaka <kensington@gentoo.org> | 2021-04-20 21:42:45 +1000 |
---|---|---|
committer | Michael Palimaka <kensington@gentoo.org> | 2021-04-20 21:43:20 +1000 |
commit | f206ad5a195c242092f603e6dfa2775564413b25 (patch) | |
tree | 0dc6138ea49de3b8602e4e051965e18c91afd0ed /dev-libs/mimetic | |
parent | dev-libs/mimetic: add upstream metadata (diff) | |
download | gentoo-f206ad5a195c242092f603e6dfa2775564413b25.tar.gz gentoo-f206ad5a195c242092f603e6dfa2775564413b25.tar.bz2 gentoo-f206ad5a195c242092f603e6dfa2775564413b25.zip |
dev-libs/mimetic: backport patch from upstream solving build failure
Thanks-to: Daniel Sunnerer <d.sunnerer@vfemail.net>
Closes: https://bugs.gentoo.org/729910
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Michael Palimaka <kensington@gentoo.org>
Diffstat (limited to 'dev-libs/mimetic')
-rw-r--r-- | dev-libs/mimetic/files/mimetic-0.9.8-build-mmap.patch | 22 | ||||
-rw-r--r-- | dev-libs/mimetic/mimetic-0.9.8.ebuild | 5 |
2 files changed, 26 insertions, 1 deletions
diff --git a/dev-libs/mimetic/files/mimetic-0.9.8-build-mmap.patch b/dev-libs/mimetic/files/mimetic-0.9.8-build-mmap.patch new file mode 100644 index 000000000000..d6c6582cd42f --- /dev/null +++ b/dev-libs/mimetic/files/mimetic-0.9.8-build-mmap.patch @@ -0,0 +1,22 @@ +From bf84940f9021950c80846e6b1a5f8b0b55991b00 Mon Sep 17 00:00:00 2001 +From: Stefano Barbato <stefano@parkopedia.com> +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 diff --git a/dev-libs/mimetic/mimetic-0.9.8.ebuild b/dev-libs/mimetic/mimetic-0.9.8.ebuild index a685af2319fd..1190360ea4df 100644 --- a/dev-libs/mimetic/mimetic-0.9.8.ebuild +++ b/dev-libs/mimetic/mimetic-0.9.8.ebuild @@ -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 |