forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-libs/mimetic: backport patch from upstream solving build failure
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
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters