Bug 687320 - On OpenBSD, libGL.so.1 doesn't exist - r=bjacob

Opening libGL.so will work regardless of the version, which changes over time.
This commit is contained in:
Landry Breuil 2011-10-25 08:48:39 -04:00
Родитель 5240fde73b
Коммит 11ea4e2516
2 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -102,7 +102,11 @@ GLXLibrary::EnsureInitialized()
// see e.g. bug 608526: it is intrinsically interesting to know whether we have dynamically linked to libGL.so.1
// because at least the NVIDIA implementation requires an executable stack, which causes mprotect calls,
// which trigger glibc bug http://sourceware.org/bugzilla/show_bug.cgi?id=12225
#ifdef __OpenBSD__
const char *libGLfilename = "libGL.so";
#else
const char *libGLfilename = "libGL.so.1";
#endif
ScopedGfxFeatureReporter reporter(libGLfilename);
mOGLLibrary = PR_LoadLibrary(libGLfilename);
if (!mOGLLibrary) {

Просмотреть файл

@ -111,7 +111,11 @@ x_error_handler(Display *, XErrorEvent *ev)
static void glxtest()
{
///// Open libGL and load needed symbols /////
#ifdef __OpenBSD__
void *libgl = dlopen("libGL.so", RTLD_LAZY);
#else
void *libgl = dlopen("libGL.so.1", RTLD_LAZY);
#endif
if (!libgl)
fatal_error("Unable to load libGL.so.1");