aboutsummaryrefslogtreecommitdiff
path: root/flatpak/patches/weird_libdecor.patch
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-07-31 22:26:20 -0700
committerGitHub <noreply@github.com>2023-07-31 22:26:20 -0700
commit2d1197f59f824a3093ad71b9ee3466bd5e2825c8 (patch)
tree368a2ba5ab9a6ae9f3b3fd0841ea5ee1d0283add /flatpak/patches/weird_libdecor.patch
parentb47993b736ba40a75b5b63290f9d7b5911f8150e (diff)
parent9137721e8e5b44f2338a36874a393435cbc6daa3 (diff)
downloadPrismLauncher-2d1197f59f824a3093ad71b9ee3466bd5e2825c8.tar.gz
PrismLauncher-2d1197f59f824a3093ad71b9ee3466bd5e2825c8.tar.bz2
PrismLauncher-2d1197f59f824a3093ad71b9ee3466bd5e2825c8.zip
Merge branch 'develop' into refactor/net-split-headers-to-proxy-class
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
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 *