File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -3011,12 +3011,9 @@ procedure TDynamicDll.DoOpenDll(const aDllName : String);
30113011 { $ifdef windows}
30123012 FDLLHandle := Windows.LoadLibrary(PChar(S));
30133013 { $else}
3014- // Linux: need here RTLD_GLOBAL, so Python can do "import ctypes"
3015- { $ifdef haiku}
3016- FDLLHandle := PtrInt(dlopen(PAnsiChar(S), RTLD_NOW+RTLD_GLOBAL));
3017- { $else}
3018- FDLLHandle := PtrInt(dlopen(PAnsiChar(S), RTLD_LAZY+RTLD_GLOBAL));
3019- { $endif}
3014+ // Linux: need here RTLD_GLOBAL, so Python can do "import ctypes"
3015+ // Haiku: without RTLD_NOW it doesn't seem to detect the library or plugins without running with "LD_PRELOAD ..."
3016+ FDLLHandle := PtrInt(dlopen(PAnsiChar(S), { $ifdef haiku} RTLD_NOW{ $else} RTLD_LAZY{ $endif} +RTLD_GLOBAL));
30203017 { $endif}
30213018 end ;
30223019end ;
You can’t perform that action at this time.
0 commit comments