From 5a720ff962446cbce84e9f3e8cf689838fdaae6f Mon Sep 17 00:00:00 2001 From: Reonu Date: Thu, 15 Jan 2026 23:44:13 +0000 Subject: [PATCH] Remove "failed to preload executable" print on Linux and MacOS (#80) --- src/main/main.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main/main.cpp b/src/main/main.cpp index c622952..8401d2d 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -513,13 +513,25 @@ void release_preload(PreloadContext& context) { context = {}; } -#else +#elif defined(__linux__) || defined(APPLE) struct PreloadContext { }; -// TODO implement on other platforms +bool preload_executable(PreloadContext& context) { + // Preloading isn't implemented on Linux and MacOS, but it's also unnecessary there, as the OS already preloads the executable. + // Therefore, we can just consider the executable to be preloaded. + return true; +} + +void release_preload(PreloadContext& context) { +} + +#else + +struct PreloadContext {}; + bool preload_executable(PreloadContext& context) { return false; }