LibC: Fix RTLD_* definitions

This commit is contained in:
2025-11-16 19:13:35 +02:00
parent ee507de154
commit 160a9278c9
2 changed files with 11 additions and 6 deletions

View File

@@ -1506,9 +1506,11 @@ char* __dlerror(void)
void* __dlopen(const char* file, int mode)
{
const bool lazy = !(mode & RTLD_NOW);
const bool lazy = (mode & _RTLD_LAZY_NOW_MASK) == RTLD_LAZY;
const bool local = (mode & _RTLD_GLOBAL_LOCAL_MASK) == RTLD_LOCAL;
// FIXME: RTLD_{LOCAL,GLOBAL}
if (local)
print(STDDBG_FILENO, "local dlopen is not supported, loading as global\n");
if (file == nullptr)
return &s_loaded_files[0];