diff --git a/daemon/main.c b/daemon/main.c index 47abd60e6..3098c37cc 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -452,7 +453,8 @@ void create_everything(struct main_context *ctx) { if (redis_ip) { dlh = dlopen(MP_PLUGIN_DIR "/mediaproxy-redis.so", RTLD_NOW | RTLD_GLOBAL); - if (!dlh && errno == ENOENT) + if (!dlh && !g_file_test(MP_PLUGIN_DIR "/mediaproxy-redis.so", G_FILE_TEST_IS_REGULAR) + && g_file_test("../../mediaproxy-redis/redis.so", G_FILE_TEST_IS_REGULAR)) dlh = dlopen("../../mediaproxy-redis/redis.so", RTLD_NOW | RTLD_GLOBAL); if (!dlh) die("Failed to open redis plugin, aborting (%s)\n", dlerror());