Explicitly link to libGL.so.1
Bug: 265599767
Change-Id: Ibd7d35fb0c6b1b09c99aee4d0dc432acc9fcbe22
diff --git a/stream-servers/apigen-codec-common/X11Support.cpp b/stream-servers/apigen-codec-common/X11Support.cpp
index 7657663..347f3a1 100644
--- a/stream-servers/apigen-codec-common/X11Support.cpp
+++ b/stream-servers/apigen-codec-common/X11Support.cpp
@@ -43,8 +43,12 @@
class GlxFunctionGetter {
public:
+ // Important: Use libGL.so.1 explicitly, because it will always link to
+ // the vendor-specific version of the library. libGL.so might in some
+ // cases, depending on bad ldconfig configurations, link to the wrapper
+ // lib that doesn't behave the same.
GlxFunctionGetter() :
- mGlxLib(android::base::SharedLibrary::open("libGL")) {
+ mGlxLib(android::base::SharedLibrary::open("libGL.so.1")) {
#define GLX_ASSIGN_DUMMY_IMPL(funcname) mApi.funcname = dummy_##funcname;