From 2004ea6b164bea06d80cd7013359fed6c98f551a Mon Sep 17 00:00:00 2001 From: Ryan Foster Date: Wed, 3 Sep 2025 14:59:01 -0400 Subject: [PATCH] Revert "libobs/util: Reject plugins linking Qt5 library for Linux" This reverts commit 615728fa3be71e928842285ce3ba8f7133d1ad22. Includes partial revert of 62429135ba502027bbab99b2ac16506cb1c0c98f. --- libobs/util/platform-nix.c | 50 ++------------------------------------ 1 file changed, 2 insertions(+), 48 deletions(-) diff --git a/libobs/util/platform-nix.c b/libobs/util/platform-nix.c index 98dfe0fee..1e26da5cd 100644 --- a/libobs/util/platform-nix.c +++ b/libobs/util/platform-nix.c @@ -14,14 +14,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "obsconfig.h" - -#if !defined(__APPLE__) && OBS_QT_VERSION == 6 -#define _GNU_SOURCE -#include -#include -#endif - #include #include #include @@ -37,6 +29,8 @@ #include #include +#include "obsconfig.h" + #if !defined(__APPLE__) #include #include @@ -110,50 +104,10 @@ void os_dlclose(void *module) dlclose(module); } -#if !defined(__APPLE__) && OBS_QT_VERSION == 6 -int module_has_qt5_check(const char *path) -{ - void *mod = dlopen(path, RTLD_LAZY); - if (mod == NULL) { - return 1; - } - - struct link_map *list = NULL; - if (dlinfo(mod, RTLD_DI_LINKMAP, &list) == 0) { - for (struct link_map *ptr = list; ptr; ptr = ptr->l_next) { - if (strstr(ptr->l_name, "libQt5") != NULL) { - return 0; - } - } - } - - return 1; -} - -bool has_qt5_dependency(const char *path) -{ - pid_t pid = fork(); - if (pid == 0) { - _exit(module_has_qt5_check(path)); - } - if (pid < 0) { - return false; - } - int status; - if (waitpid(pid, &status, 0) < 0) { - return false; - } - return WIFEXITED(status) && WEXITSTATUS(status) == 0; -} -#endif - void get_plugin_info(const char *path, bool *is_obs_plugin, bool *can_load) { *is_obs_plugin = true; *can_load = true; -#if !defined(__APPLE__) && OBS_QT_VERSION == 6 - *can_load = !has_qt5_dependency(path); -#endif UNUSED_PARAMETER(path); }