aboutsummaryrefslogtreecommitdiffstats
path: root/games/0ad
diff options
context:
space:
mode:
authormadpilot <madpilot@FreeBSD.org>2014-12-09 22:06:58 +0800
committermadpilot <madpilot@FreeBSD.org>2014-12-09 22:06:58 +0800
commit96f39bc9c857fd784a9c3d63776930b0c44abd16 (patch)
treec66ac9244a3932a852b22e1efcc4b9cc0a931d58 /games/0ad
parent1e3ba94aeedf392883fc38ba521dcb44222c74ef (diff)
downloadfreebsd-ports-gnome-96f39bc9c857fd784a9c3d63776930b0c44abd16.tar.gz
freebsd-ports-gnome-96f39bc9c857fd784a9c3d63776930b0c44abd16.tar.zst
freebsd-ports-gnome-96f39bc9c857fd784a9c3d63776930b0c44abd16.zip
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)
Diffstat (limited to 'games/0ad')
-rw-r--r--games/0ad/files/patch-source_lib_allocators_page__aligned.cpp20
-rw-r--r--games/0ad/files/patch-source_lib_sysdep_os_unix_uvm.cpp20
2 files changed, 40 insertions, 0 deletions
diff --git a/games/0ad/files/patch-source_lib_allocators_page__aligned.cpp b/games/0ad/files/patch-source_lib_allocators_page__aligned.cpp
new file mode 100644
index 000000000000..7a0f148e064f
--- /dev/null
+++ b/games/0ad/files/patch-source_lib_allocators_page__aligned.cpp
@@ -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);
+ }
+
diff --git a/games/0ad/files/patch-source_lib_sysdep_os_unix_uvm.cpp b/games/0ad/files/patch-source_lib_sysdep_os_unix_uvm.cpp
new file mode 100644
index 000000000000..eb4e0ea33739
--- /dev/null
+++ b/games/0ad/files/patch-source_lib_sysdep_os_unix_uvm.cpp
@@ -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;
+ }