# HG changeset patch # User Maya Rashish # Date 1559605974 25200 # Node ID 8bcc51aaa91e5aadd57bdf5484c200c3713baab8 # Parent b46eb2b0c656af4f2afd609012852ab269c9bb04 Bug 1180498 - Tolerate a different major libGL.so on NetBSD as well r=jgilbert diff --git a/gfx/gl/GLContextProviderGLX.cpp b/gfx/gl/GLContextProviderGLX.cpp --- a/gfx/gl/GLContextProviderGLX.cpp +++ b/gfx/gl/GLContextProviderGLX.cpp @@ -75,17 +75,17 @@ GLXLibrary::EnsureInitialized() if (!mOGLLibrary) { const char* libGLfilename = nullptr; bool forceFeatureReport = false; // 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__ +#if defined(__OpenBSD__) || defined(__NetBSD__) libGLfilename = "libGL.so"; #else libGLfilename = "libGL.so.1"; #endif ScopedGfxFeatureReporter reporter(libGLfilename, forceFeatureReport); mOGLLibrary = PR_LoadLibrary(libGLfilename); if (!mOGLLibrary) { diff --git a/toolkit/xre/glxtest.cpp b/toolkit/xre/glxtest.cpp --- a/toolkit/xre/glxtest.cpp +++ b/toolkit/xre/glxtest.cpp @@ -119,17 +119,17 @@ void glxtest() for (int i = 1; i < fd; i++) dup2(fd, i); close(fd); if (getenv("MOZ_AVOID_OPENGL_ALTOGETHER")) fatal_error("The MOZ_AVOID_OPENGL_ALTOGETHER environment variable is defined"); ///// Open libGL and load needed symbols ///// -#ifdef __OpenBSD__ +#if defined(__OpenBSD__) || defined(__NetBSD__) #define LIBGL_FILENAME "libGL.so" #else #define LIBGL_FILENAME "libGL.so.1" #endif void *libgl = dlopen(LIBGL_FILENAME, RTLD_LAZY); if (!libgl) fatal_error("Unable to load " LIBGL_FILENAME);