summaryrefslogtreecommitdiff
path: root/src/unix/hunk.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2012-08-24 20:42:28 +0400
committerAndrey Nazarov <skuller@skuller.net>2012-08-24 20:42:28 +0400
commit90c4841855f94853a0f678da792527f6a175cf2c (patch)
treec07fe63cfed2cb89b9c0c16045050282033c32fd /src/unix/hunk.c
parent8eea41ce9d6a70dd0e7d835f940859b5824fc22f (diff)
Make Q2PRO compile on OpenBSD.
Original patch provided by Jonathan Gray.
Diffstat (limited to 'src/unix/hunk.c')
-rw-r--r--src/unix/hunk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/unix/hunk.c b/src/unix/hunk.c
index f88da34..c381429 100644
--- a/src/unix/hunk.c
+++ b/src/unix/hunk.c
@@ -71,7 +71,7 @@ void Hunk_End(memhunk_t *hunk)
newsize = (hunk->cursize + 4095) & ~4095;
if (newsize < hunk->maxsize) {
-#ifdef _GNU_SOURCE
+#if (defined __linux__) && (defined _GNU_SOURCE)
void *buf = mremap(hunk->base, hunk->maxsize, newsize, 0);
#else
void *unmap_base = (byte *)hunk->base + newsize;