From bb7d565837f9e30e05ab9cb09b472f2a2af8f7fe Mon Sep 17 00:00:00 2001 From: Lemmy Date: Sun, 10 May 2026 09:34:07 -0400 Subject: [PATCH] gate mallopt behind GLIBC check --- src/main.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index da4791ea5..9bfc5c3c6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -12,16 +12,14 @@ #include #include -#ifdef __has_include +#ifdef __GLIBC__ #if __has_include() #include #define HAS_JEMALLOC 1 -#endif -#endif - -#ifndef HAS_JEMALLOC +#else #include #endif +#endif namespace { @@ -75,9 +73,11 @@ const char* malloc_conf = "narenas:2,dirty_decay_ms:1000,muzzy_decay_ms:5000,tca #endif int main(int argc, char* argv[]) { -#ifndef HAS_JEMALLOC + +#if defined(__GLIBC__) && !defined(HAS_JEMALLOC) mallopt(M_ARENA_MAX, 2); #endif + std::setlocale(LC_ALL, ""); if (argc >= 2) { if (std::strcmp(argv[1], "theme") == 0)