Fix the last bug and finally support OpenBSD

This commit is contained in:
Emilio Moretti 2014-09-29 22:36:59 -03:00
parent 76867b161f
commit 079a4b2e9c
1 changed files with 4 additions and 0 deletions

View File

@ -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;