[Mesa-dev] [PATCH] egl/dri2: add a libname to dlopen for OpenBSD

Jonathan Gray jsg at jsg.id.au
Sun Oct 16 05:38:35 UTC 2016


On OpenBSD try to dlopen 'libglapi.so', ld.so will find
the highest major/minor version and open it in this case.

Avoids '#error Unknown glapi provider for this platform' at build time.

Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
---
 src/egl/drivers/dri2/egl_dri2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 8785e31..9655a49 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -2802,7 +2802,7 @@ static EGLBoolean
 dri2_load(_EGLDriver *drv)
 {
    struct dri2_egl_driver *dri2_drv = dri2_egl_driver(drv);
-#ifdef HAVE_ANDROID_PLATFORM
+#if defined(HAVE_ANDROID_PLATFORM) || defined(__OpenBSD__)
    const char *libname = "libglapi.so";
 #elif defined(__APPLE__)
    const char *libname = "libglapi.0.dylib";
-- 
2.9.3



More information about the mesa-dev mailing list