From 9249c89dc617084640848d4b429311ed3dc152d9 Mon Sep 17 00:00:00 2001 From: Mel Zuser Date: Wed, 15 May 2024 18:48:00 -0700 Subject: build: fix build when gc is disabled Change-Id: I8d3eb8874a4138668011b525c3b400a55a1f4866 --- src/libcmd/repl.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libcmd') diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc index 34de2160a..525c25560 100644 --- a/src/libcmd/repl.cc +++ b/src/libcmd/repl.cc @@ -141,7 +141,11 @@ struct NixRepl * Note: This is `shared_ptr` to avoid garbage collection. */ std::shared_ptr replOverlaysEvalFunction = + #if HAVE_BOEHMGC std::allocate_shared(traceable_allocator(), nullptr); + #else + std::make_shared(nullptr); + #endif /** * Get the `info` AttrSet that's passed as the first argument to each -- cgit v1.2.3