summaryrefslogtreecommitdiff
path: root/src/unix
diff options
context:
space:
mode:
Diffstat (limited to 'src/unix')
-rw-r--r--src/unix/hunk.c2
-rw-r--r--src/unix/sdl/video.c8
2 files changed, 8 insertions, 2 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;
diff --git a/src/unix/sdl/video.c b/src/unix/sdl/video.c
index 9efd439..a5780eb 100644
--- a/src/unix/sdl/video.c
+++ b/src/unix/sdl/video.c
@@ -659,6 +659,12 @@ static void init_opengl(void)
#endif
}
+#ifdef __OpenBSD__
+#define LIBGL "libGL.so"
+#else
+#define LIBGL "libGL.so.1"
+#endif
+
qboolean VID_Init(void)
{
cvar_t *gl_driver;
@@ -674,7 +680,7 @@ qboolean VID_Init(void)
return qfalse;
}
- gl_driver = Cvar_Get("gl_driver", "libGL.so.1", CVAR_REFRESH);
+ gl_driver = Cvar_Get("gl_driver", LIBGL, CVAR_REFRESH);
gl_colorbits = Cvar_Get("gl_colorbits", "0", CVAR_REFRESH);
gl_depthbits = Cvar_Get("gl_depthbits", "0", CVAR_REFRESH);
gl_stencilbits = Cvar_Get("gl_stencilbits", "8", CVAR_REFRESH);