From 2cb836b125ae65e4b49b82c221d37ad706df814b Mon Sep 17 00:00:00 2001 From: pupbrained Date: Sun, 4 May 2025 17:57:40 -0400 Subject: [PATCH] erm --- src/core/package.cpp | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/core/package.cpp b/src/core/package.cpp index 5df0fdd..e7f1905 100644 --- a/src/core/package.cpp +++ b/src/core/package.cpp @@ -1,13 +1,16 @@ #include "package.hpp" -#include // SQLite::{Database, OPEN_READONLY} -#include // SQLite::Exception -#include // SQLite::Statement -#include // std::chrono -#include // std::filesystem -#include // std::format -#include // std::{async, future, launch} -#include // std::error_code +#ifndef __serenity__ + #include // SQLite::{Database, OPEN_READONLY} + #include // SQLite::Exception + #include // SQLite::Statement +#endif // __serenity__ + +#include // std::chrono +#include // std::filesystem +#include // std::format +#include // std::{async, future, launch} +#include // std::error_code #include "src/util/cache.hpp" #include "src/util/error.hpp" @@ -137,6 +140,7 @@ namespace package { return GetCountFromDirectoryImpl(pmId, dirPath, noFilter, false); } +#ifndef __serenity__ fn GetCountFromDb(const PackageManagerInfo& pmInfo) -> Result { const auto& [pmId, dbPath, countQuery] = pmInfo; const String cacheKey = "pkg_count_" + pmId; // More specific cache key @@ -226,6 +230,7 @@ namespace package { return count; } +#endif // __serenity__ #if defined(__linux__) || defined(__APPLE__) fn GetNixCount() -> Result { @@ -246,7 +251,7 @@ namespace package { return GetCountFromDb(nixInfo); } -#endif +#endif // __linux__ || __APPLE__ fn GetCargoCount() -> Result { using util::helpers::GetEnv; @@ -302,7 +307,7 @@ namespace package { #if defined(__linux__) || defined(__APPLE__) futures.push_back(std::async(std::launch::async, GetNixCount)); -#endif +#endif // __linux__ || __APPLE__ futures.push_back(std::async(std::launch::async, GetCargoCount)); u64 totalCount = 0;