fixing mingw errors
VoidLoader/VoidLoaderCore/pipeline/head There was a failure building this commit

Signed-off-by: Faumaray <faumaray@gmail.com>
This commit is contained in:
faumaray committed 2025-10-21 00:31:17 +03:00
1 parent df54abb9ad
commit 71bfa7b32d
5 files changed
+11 -5

No files matched your search

+3 -1
View File
@@ -1,9 +1,11 @@
#pragma once #pragma once
#if defined(unix) #if defined(unix)
#include <string> #include <string>
namespace vl::mod {
void* LoadLibrary(const std::string& path, bool isGlobal); void* LoadLibrary(const std::string& path, bool isGlobal);
bool CloseLibrary(void* handle); bool CloseLibrary(void* handle);
void* LoadSymbol(void* handle, const std::string& name); void* LoadSymbol(void* handle, const std::string& name);
}
#endif #endif
+2 -1
View File
@@ -2,8 +2,9 @@
#if defined(_WIN32) #if defined(_WIN32)
#include <string> #include <string>
namespace vl::mod {
void* LoadLibrary(const std::string& path, bool isGlobal); void* LoadLibrary(const std::string& path, bool isGlobal);
bool CloseLibrary(void* handle); bool CloseLibrary(void* handle);
void* LoadSymbol(void* handle, const std::string& name); void* LoadSymbol(void* handle, const std::string& name);
}
#endif #endif
+1 -1
View File
@@ -35,7 +35,7 @@ namespace vl::Agent {
return; return;
} }
LoadLibrary(mods.at("VoidLoaderApi.vlmod").string(), true); vl::mod::LoadLibrary(mods.at("VoidLoaderApi.vlmod").string(), true);
mods.erase("VoidLoaderApi.vlmod"); mods.erase("VoidLoaderApi.vlmod");
mods.erase("VoidLoader.vlmod"); mods.erase("VoidLoader.vlmod");
+2 -1
View File
@@ -2,7 +2,7 @@
#include <Mods/LoadLibraryUnix.hpp> #include <Mods/LoadLibraryUnix.hpp>
#include <dlfcn.h> #include <dlfcn.h>
namespace vl::mod {
void* LoadLibrary(const std::string& path, bool isGlobal) void* LoadLibrary(const std::string& path, bool isGlobal)
{ {
dlerror(); dlerror();
@@ -17,4 +17,5 @@ void* LoadSymbol(void* handle, const std::string& name)
dlerror(); dlerror();
return dlsym(handle, name.c_str()); return dlsym(handle, name.c_str());
} }
}
#endif #endif
+3 -1
View File
@@ -4,6 +4,8 @@
#include <assert.h> #include <assert.h>
#include <cstdint> #include <cstdint>
#include <windows.h> #include <windows.h>
namespace vl::mod {
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
static int32_t __wtf8_decode1(const char** input) { static int32_t __wtf8_decode1(const char** input) {
uint32_t code_point; uint32_t code_point;
@@ -110,5 +112,5 @@ void* LoadSymbol(void* handle, const std::string& name)
{ {
return (void*)(uintptr_t) GetProcAddress(static_cast<HMODULE>(handle), name.c_str()); return (void*)(uintptr_t) GetProcAddress(static_cast<HMODULE>(handle), name.c_str());
} }
}
#endif #endif