patch-mimetic_os_mmfile_cxx 417 B

123456789101112131415
  1. $OpenBSD: patch-mimetic_os_mmfile_cxx,v 1.1 2017/05/13 07:57:57 espie Exp $
  2. Index: mimetic/os/mmfile.cxx
  3. --- mimetic/os/mmfile.cxx.orig
  4. +++ mimetic/os/mmfile.cxx
  5. @@ -57,7 +57,7 @@ bool MMFile::open(int mode)
  6. bool MMFile::map()
  7. {
  8. m_beg = (char*) mmap(0, m_st.st_size, PROT_READ, MAP_SHARED,m_fd,0);
  9. - if(m_beg > 0)
  10. + if(m_beg != 0)
  11. {
  12. m_end = m_beg + m_st.st_size;
  13. #if HAVE_MADVISE