From 079a4b2e9c9fdd113cc4dadb6bfd354da23f24bc Mon Sep 17 00:00:00 2001 From: Emilio Moretti Date: Mon, 29 Sep 2014 22:36:59 -0300 Subject: [PATCH] Fix the last bug and finally support OpenBSD --- src/native/linux/opengl/extgl_glx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/native/linux/opengl/extgl_glx.c b/src/native/linux/opengl/extgl_glx.c index 2a22e012..750ae45f 100644 --- a/src/native/linux/opengl/extgl_glx.c +++ b/src/native/linux/opengl/extgl_glx.c @@ -220,7 +220,11 @@ bool extgl_Open(JNIEnv *env) { * * DRI drivers need this flag to work properly */ +#ifdef __OpenBSD__ + lib_gl_handle = dlopen("libGL.so", RTLD_LAZY | RTLD_GLOBAL); +#else lib_gl_handle = dlopen("libGL.so.1", RTLD_LAZY | RTLD_GLOBAL); +#endif if (lib_gl_handle == NULL) { throwFormattedException(env, "Error loading libGL.so.1: %s", dlerror()); return false;