33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
From d8cd671cc68d503757e32eb80f7a4dee44e47754 Mon Sep 17 00:00:00 2001
|
|
From: Ondrej Holy <oholy@redhat.com>
|
|
Date: Wed, 27 May 2020 08:43:00 +0200
|
|
Subject: [PATCH] winpr/library: Use RTLD_GLOBAL for dlopen
|
|
|
|
LoadLibraryA implementation uses the RTLD_LOCAL flag for dlopen currently.
|
|
This flag doesn't allow the symbols to be used by the subsequently loaded
|
|
libraries. This is a problem for the video channel when -DBUILTIN_CHANNELS=OFF
|
|
is used as it uses functions from the geometry channel. Let's use RTLD_GLOBAL
|
|
instead to prevent "undefined symbol" errors in such cases.
|
|
|
|
Fixes: https://github.com/FreeRDP/FreeRDP/issues/6236
|
|
---
|
|
winpr/libwinpr/library/library.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/winpr/libwinpr/library/library.c b/winpr/libwinpr/library/library.c
|
|
index f44a96d27..8d33227b2 100644
|
|
--- a/winpr/libwinpr/library/library.c
|
|
+++ b/winpr/libwinpr/library/library.c
|
|
@@ -125,7 +125,7 @@ HMODULE LoadLibraryA(LPCSTR lpLibFileName)
|
|
return hModule;
|
|
#else
|
|
HMODULE library;
|
|
- library = dlopen(lpLibFileName, RTLD_LOCAL | RTLD_LAZY);
|
|
+ library = dlopen(lpLibFileName, RTLD_GLOBAL | RTLD_LAZY);
|
|
|
|
if (!library)
|
|
{
|
|
--
|
|
2.26.2
|
|
|