[vlc-devel] [PATCH] Prevent loading KDE plugins for Qt4
Rémi Denis-Courmont
remi at remlab.net
Sun May 30 10:30:53 CEST 2010
Since they cause crashes pretty much all the time (KDE bug #234484).
Fixes: LP#408719, Debian #580396.
---
bin/override.c | 11 +++++++++++
bin/vlc.c | 9 ---------
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/bin/override.c b/bin/override.c
index 02402d5..e19ed2b 100644
--- a/bin/override.c
+++ b/bin/override.c
@@ -280,6 +280,17 @@ int (*XSetIOErrorHandler (int (*handler) (Display *))) (Display *)
return CALL(XSetIOErrorHandler, handler);
}
#endif
+
+/*** Buggy shared objects ***/
+#include <string.h>
+
+void *dlopen (const char *path, int flag)
+{
+ if (strstr (path, "/gui_platform/libkde.so"))
+ return NULL; /* Oh no, not that one! */
+ return CALL(dlopen, path, flag);
+}
+
#else
void vlc_enable_override (void)
{
diff --git a/bin/vlc.c b/bin/vlc.c
index 4cf6c83..0f41560 100644
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -203,14 +203,5 @@ int main( int i_argc, const char *ppsz_argv[] )
for (int i = 2; i < argc; i++)
LocaleFree (argv[i]);
-#ifdef RTLD_NOLOAD
- /* Avoid crash in KIO scheduler cleanup. */
- /* This is ugly, but we get way too many crash reports due to this. */
- if (dlopen ("libkfilemodule.so", RTLD_LAZY|RTLD_LOCAL|RTLD_NOLOAD) != NULL)
- {
- fprintf (stderr, "KFile plugin present. Unclean shutdown!\n");
- _exit (0);
- }
-#endif
return 0;
}
--
1.7.1
More information about the vlc-devel
mailing list