aboutsummaryrefslogtreecommitdiff
path: root/flatpak/patches/weird_libdecor.patch
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-07-19 12:26:12 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-07-19 12:26:12 +0300
commitf046bd7d500c16f530db48f9da5b0809a02b7519 (patch)
treee87c08a1042566236b64cebed8dde9728f49046f /flatpak/patches/weird_libdecor.patch
parentec32618e1158beba1cf5b4c91c3835a233eceeeb (diff)
parent593f45298614843c14acb11994320f90a474c750 (diff)
downloadPrismLauncher-f046bd7d500c16f530db48f9da5b0809a02b7519.tar.gz
PrismLauncher-f046bd7d500c16f530db48f9da5b0809a02b7519.tar.bz2
PrismLauncher-f046bd7d500c16f530db48f9da5b0809a02b7519.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into catpacks
Diffstat (limited to 'flatpak/patches/weird_libdecor.patch')
-rw-r--r--flatpak/patches/weird_libdecor.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/flatpak/patches/weird_libdecor.patch b/flatpak/patches/weird_libdecor.patch
new file mode 100644
index 00000000..3a400b82
--- /dev/null
+++ b/flatpak/patches/weird_libdecor.patch
@@ -0,0 +1,40 @@
+diff --git a/src/libdecor.c b/src/libdecor.c
+index a9c1106..1aa38b3 100644
+--- a/src/libdecor.c
++++ b/src/libdecor.c
+@@ -1391,22 +1391,32 @@ calculate_priority(const struct libdecor_plugin_description *plugin_description)
+ static bool
+ check_symbol_conflicts(const struct libdecor_plugin_description *plugin_description)
+ {
++ bool ret = true;
+ char * const *symbol;
++ void* main_prog = dlopen(NULL, RTLD_LAZY);
++ if (!main_prog) {
++ fprintf(stderr, "Plugin \"%s\" couldn't check conflicting symbols: \"%s\".\n",
++ plugin_description->description, dlerror());
++ return false;
++ }
++
+
+ symbol = plugin_description->conflicting_symbols;
+ while (*symbol) {
+ dlerror();
+- dlsym (RTLD_DEFAULT, *symbol);
++ dlsym (main_prog, *symbol);
+ if (!dlerror()) {
+ fprintf(stderr, "Plugin \"%s\" uses conflicting symbol \"%s\".\n",
+ plugin_description->description, *symbol);
+- return false;
++ ret = false;
++ break;
+ }
+
+ symbol++;
+ }
+
+- return true;
++ dlclose(main_prog);
++ return ret;
+ }
+
+ static struct plugin_loader *