summaryrefslogtreecommitdiff
path: root/games/sdlquake2/files/patch-q_shlinux.c
diff options
context:
space:
mode:
Diffstat (limited to 'games/sdlquake2/files/patch-q_shlinux.c')
-rw-r--r--games/sdlquake2/files/patch-q_shlinux.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/games/sdlquake2/files/patch-q_shlinux.c b/games/sdlquake2/files/patch-q_shlinux.c
deleted file mode 100644
index 8e371636f9b3..000000000000
--- a/games/sdlquake2/files/patch-q_shlinux.c
+++ /dev/null
@@ -1,48 +0,0 @@
---- ./q_shlinux.c.orig Thu May 19 17:56:13 2005
-+++ ./q_shlinux.c Sun Feb 26 11:23:56 2006
-@@ -12,6 +12,10 @@
-
- #include "qcommon.h"
-
-+#ifdef __FreeBSD__
-+#include <machine/param.h>
-+#endif
-+
- //===============================================================================
-
- byte *membase;
-@@ -54,14 +58,32 @@
-
- int Hunk_End (void)
- {
--#ifndef __FreeBSD__
- byte *n;
-
-+#ifdef __FreeBSD__
-+ size_t old_size = maxhunksize;
-+ size_t new_size = curhunksize + sizeof(int);
-+ void * unmap_base;
-+ size_t unmap_len;
-+
-+ new_size = round_page(new_size);
-+ old_size = round_page(old_size);
-+
-+ if (new_size > old_size)
-+ n = 0; /* error */
-+ else if (new_size < old_size)
-+ {
-+ unmap_base = (caddr_t)(membase + new_size);
-+ unmap_len = old_size - new_size;
-+ n = munmap(unmap_base, unmap_len) + membase;
-+ }
-+#endif
-+#ifdef __linux__
- n = mremap(membase, maxhunksize, curhunksize + sizeof(int), 0);
-+#endif
- if (n != membase)
- Sys_Error("Hunk_End: Could not remap virtual block (%d)", errno);
- *((int *)membase) = curhunksize + sizeof(int);
--#endif
-
- return curhunksize;
- }