[Mesa-dev] [PATCH] egl/dri2: add a libname to dlopen for OpenBSD
eric.engestrom at imgtec.com
Mon Oct 17 09:53:45 UTC 2016
On Sunday, 2016-10-16 16:38:35 +1100, Jonathan Gray wrote:
> 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>
LGTM, and I guess the other *BSD will want the same since 7a9c92d0 broke
Fixes: 7a9c92d071d010066349 ("egl/dri2: non-shared glapi cleanups")
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
Side note, I don't understand why we hardcode the version everywhere
(except Android). I can see it's been like that since that code was
added nearly 6 years ago (218381d9), but I couldn't find an explanation
in the logs, or any mention of it in the thread I found .
Emil, do you know?
> 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";
More information about the mesa-dev