diff -u mesa-7.0.2/debian/patches/series mesa-7.0.2/debian/patches/series --- mesa-7.0.2/debian/patches/series +++ mesa-7.0.2/debian/patches/series @@ -8,0 +9 @@ +104_dlopen_drivers.patch diff -u mesa-7.0.2/debian/changelog mesa-7.0.2/debian/changelog --- mesa-7.0.2/debian/changelog +++ mesa-7.0.2/debian/changelog @@ -1,3 +1,16 @@ +mesa (7.0.2-4ubuntu3) hardy; urgency=low + + * 104_dlopen_drivers.patch: + - Patch from MythTV SVN: (LP: #189580) + "OpenDriver? which dlopen's the correct .so on the first call. Subsequent + calls get the handle from that initial dlopen. Unfortunately this + doesn't increment the reference count for the .so and a dlclose at the + first nested XOpenDisplay/XCloseDisplay (like in libmythtv's + get_glx_version) causes the dri library to be unloaded and soon after + that MythTV go boom. + + -- Mario Limonciello Thu, 21 Feb 2008 18:48:33 -0600 + mesa (7.0.2-4ubuntu2) hardy; urgency=low * 103_fix_rv410se.diff: only in patch2: unchanged: --- mesa-7.0.2.orig/debian/patches/104_dlopen_drivers.patch +++ mesa-7.0.2/debian/patches/104_dlopen_drivers.patch @@ -0,0 +1,21 @@ +Index: mesa-7.0.2/src/glx/x11/dri_glx.c +=================================================================== +--- mesa-7.0.2.orig/src/glx/x11/dri_glx.c 2008-02-21 18:37:58.000000000 -0600 ++++ mesa-7.0.2/src/glx/x11/dri_glx.c 2008-02-21 18:39:13.000000000 -0600 +@@ -48,6 +48,7 @@ + #include "dri_glx.h" + #include + #include ++#include + + #ifndef RTLD_NOW + #define RTLD_NOW 0 +@@ -198,6 +199,8 @@ + for (driver = Drivers; driver; driver = driver->next) { + if (strcmp(driver->name, driverName) == 0) { + /* found it */ ++ char *libPath = ((struct link_map *)(driver->handle))->l_name; ++ dlopen(libPath, RTLD_NOW | RTLD_GLOBAL); + return driver; + } + }