diff options
author | Frank Henigman <[email protected]> | 2014-11-06 16:29:26 -0500 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-06-23 17:08:05 +0100 |
commit | 828f13330c9384f2b55c8b0f962d93a74ecd0601 (patch) | |
tree | a18158b3121697652c673724327e48c4713112ef /src/gbm/backends | |
parent | 6ed52f78a05a2b56eb521c50767b7a991df51564 (diff) |
gbm: dlopen libglapi so gbm_create_device works
Dri driver libs are not linked to pull in libglapi so gbm_create_device()
fails when it tries to dlopen them (unless the application is linked
with something that does pull in libglapi, like libGL).
Until dri drivers can be fixed properly, dlopen libglapi before trying
to dlopen them.
Cc: "10.5 10.6" <[email protected]>
Signed-off-by: Frank Henigman <[email protected]>
[Emil Velikov: Drop misleading bugzilla link, mention that libname differs]
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gbm/backends')
-rw-r--r-- | src/gbm/backends/dri/gbm_dri.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index 62bdf891d57..ccc3cc6930f 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -311,6 +311,14 @@ dri_open_driver(struct gbm_dri_device *dri) if (search_paths == NULL) search_paths = DEFAULT_DRIVER_DIR; + /* Temporarily work around dri driver libs that need symbols in libglapi + * but don't automatically link it in. + */ + /* XXX: Library name differs on per platforms basis. Update this as + * osx/cygwin/windows/bsd gets support for GBM.. + */ + dlopen("libglapi.so.0", RTLD_LAZY | RTLD_GLOBAL); + dri->driver = NULL; end = search_paths + strlen(search_paths); for (p = search_paths; p < end && dri->driver == NULL; p = next + 1) { |