Try to load libX11.so.6 in addition to libX11.so. (#5307)

This commit is contained in:
David Stern authored and Connor Fitzgerald committed 2024-02-29 16:32:32 -05:00
1 parent 565f6990c2
commit 40ebec1dfd
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -84,6 +84,7 @@ Bottom level categories:
#### OpenGL
- Fix internal format for the `Etc2Rgba8Unorm` format. By @andristarr in [#5178](https://github.com/gfx-rs/wgpu/pull/5178)
- Try to load `libX11.so.6` in addition to `libX11.so` on linux. [#5307](https://github.com/gfx-rs/wgpu/pull/5307)
#### `glsl-in`
+1 -1
View File
@@ -161,7 +161,7 @@ impl Drop for DisplayOwner {
fn open_x_display() -> Option<DisplayOwner> {
log::debug!("Loading X11 library to get the current display");
unsafe {
let library = libloading::Library::new("libX11.so").ok()?;
let library = find_library(&["libX11.so.6", "libX11.so"])?;
let func: libloading::Symbol<XOpenDisplayFun> = library.get(b"XOpenDisplay").unwrap();
let result = func(ptr::null());
ptr::NonNull::new(result).map(|ptr| DisplayOwner {