x11vulkan: Use the correct SONAME of libX11-xcb.so.1 on Linux, etc.
On most Unix platforms supported by SDL, the canonical name used to load a library at runtime includes its ABI major version, and the name without a version is not guaranteed to exist on non-developer systems. libX11-xcb.so.1 is correct on Linux, and probably on other Unix platforms like FreeBSD. A notable exception is OpenBSD, which apparently does not use ABI-suffixed names, so continue to use libX11-xcb.so there. Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit7713a7eec7) (cherry picked from commit54757c29dd)
This commit is contained in:
1 parent
1df907b1ba
commit
38d3b1b6d6
1 file changed
+3
-1
@@ -32,8 +32,10 @@
|
|||||||
|
|
||||||
#if defined(__OpenBSD__)
|
#if defined(__OpenBSD__)
|
||||||
#define DEFAULT_VULKAN "libvulkan.so"
|
#define DEFAULT_VULKAN "libvulkan.so"
|
||||||
|
#define DEFAULT_X11_XCB "libX11-xcb.so"
|
||||||
#else
|
#else
|
||||||
#define DEFAULT_VULKAN "libvulkan.so.1"
|
#define DEFAULT_VULKAN "libvulkan.so.1"
|
||||||
|
#define DEFAULT_X11_XCB "libX11-xcb.so.1"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -108,7 +110,7 @@ int X11_Vulkan_LoadLibrary(_THIS, const char *path)
|
|||||||
} else {
|
} else {
|
||||||
const char *libX11XCBLibraryName = SDL_getenv("SDL_X11_XCB_LIBRARY");
|
const char *libX11XCBLibraryName = SDL_getenv("SDL_X11_XCB_LIBRARY");
|
||||||
if (!libX11XCBLibraryName) {
|
if (!libX11XCBLibraryName) {
|
||||||
libX11XCBLibraryName = "libX11-xcb.so";
|
libX11XCBLibraryName = DEFAULT_X11_XCB;
|
||||||
}
|
}
|
||||||
videoData->vulkan_xlib_xcb_library = SDL_LoadObject(libX11XCBLibraryName);
|
videoData->vulkan_xlib_xcb_library = SDL_LoadObject(libX11XCBLibraryName);
|
||||||
if (!videoData->vulkan_xlib_xcb_library) {
|
if (!videoData->vulkan_xlib_xcb_library) {
|
||||||
|
|||||||
Reference in new issue
Block a user