From c0b35c71cdb0470596f9e88d05063aa8faed6e10 Mon Sep 17 00:00:00 2001 From: Sergei Zimmerman Date: Fri, 12 Sep 2025 04:00:51 +0300 Subject: [PATCH] libexpr: Fix build without Boehm This should have been placed under the ifdef. --- src/libexpr/eval-gc.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libexpr/eval-gc.cc b/src/libexpr/eval-gc.cc index 28aed7c37..0d25f38f6 100644 --- a/src/libexpr/eval-gc.cc +++ b/src/libexpr/eval-gc.cc @@ -24,6 +24,10 @@ #endif +namespace nix { + +#if NIX_USE_BOEHMGC + /* * Ensure that Boehm satisfies our alignment requirements. This is the default configuration [^] * and this assertion should never break for any platform. Let's assert it just in case. @@ -35,9 +39,6 @@ */ static_assert(sizeof(void *) * 2 == GC_GRANULE_BYTES, "Boehm GC must use GC_GRANULE_WORDS = 2"); -namespace nix { - -#if NIX_USE_BOEHMGC /* Called when the Boehm GC runs out of memory. */ static void * oomHandler(size_t requested) {