Date: Tue, 9 Dec 2014 14:06:59 +0000 (UTC) From: Guido Falsi <madpilot@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r374392 - head/games/0ad/files Message-ID: <201412091406.sB9E6xju082899@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: madpilot Date: Tue Dec 9 14:06:58 2014 New Revision: 374392 URL: https://svnweb.freebsd.org/changeset/ports/374392 QAT: https://qat.redports.org/buildarchive/r374392/ Log: Fix build on recent head by removing references to the MAP_NORESERVE flag to mmap(2). It has never been implemented in FreeBSD and thus was being ignored before anyway. No functional change, so no PORTREVISION bump. PR: 193961 (related) Added: head/games/0ad/files/patch-source_lib_allocators_page__aligned.cpp (contents, props changed) head/games/0ad/files/patch-source_lib_sysdep_os_unix_uvm.cpp (contents, props changed) Added: head/games/0ad/files/patch-source_lib_allocators_page__aligned.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/0ad/files/patch-source_lib_allocators_page__aligned.cpp Tue Dec 9 14:06:58 2014 (r374392) @@ -0,0 +1,20 @@ +--- source/lib/allocators/page_aligned.cpp.orig 2011-05-03 12:38:42 UTC ++++ source/lib/allocators/page_aligned.cpp +@@ -49,7 +49,7 @@ static const int mmap_flags = MAP_PRIVAT + Status mem_Reserve(size_t size, u8** pp) + { + errno = 0; +- void* ret = mmap(0, size, PROT_NONE, mmap_flags|MAP_NORESERVE, -1, 0); ++ void* ret = mmap(0, size, PROT_NONE, mmap_flags, -1, 0); + *pp = (u8*)ret; + return StatusFromMap(ret); + } +@@ -76,7 +76,7 @@ Status mem_Commit(u8* p, size_t size, in + Status mem_Decommit(u8* p, size_t size) + { + errno = 0; +- void* ret = mmap(p, size, PROT_NONE, mmap_flags|MAP_NORESERVE|MAP_FIXED, -1, 0); ++ void* ret = mmap(p, size, PROT_NONE, mmap_flags|MAP_FIXED, -1, 0); + return StatusFromMap(ret); + } + Added: head/games/0ad/files/patch-source_lib_sysdep_os_unix_uvm.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/0ad/files/patch-source_lib_sysdep_os_unix_uvm.cpp Tue Dec 9 14:06:58 2014 (r374392) @@ -0,0 +1,20 @@ +--- source/lib/sysdep/os/unix/uvm.cpp.orig 2013-12-06 00:42:50 UTC ++++ source/lib/sysdep/os/unix/uvm.cpp +@@ -40,7 +40,7 @@ namespace vm { + void* ReserveAddressSpace(size_t size, size_t UNUSED(commitSize), PageType UNUSED(pageType), int UNUSED(prot)) + { + errno = 0; +- void* p = mmap(0, size, PROT_NONE, mmap_flags|MAP_NORESERVE, -1, 0); ++ void* p = mmap(0, size, PROT_NONE, mmap_flags, -1, 0); + if(p == MAP_FAILED) + return 0; + return p; +@@ -77,7 +77,7 @@ bool Commit(uintptr_t address, size_t si + bool Decommit(uintptr_t address, size_t size) + { + errno = 0; +- if(mmap((void*)address, size, PROT_NONE, mmap_flags|MAP_NORESERVE|MAP_FIXED, -1, 0) == MAP_FAILED) ++ if(mmap((void*)address, size, PROT_NONE, mmap_flags|MAP_FIXED, -1, 0) == MAP_FAILED) + return false; + return true; + }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412091406.sB9E6xju082899>