aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMel Zuser <mel.zuser@arista.com>2024-05-15 18:48:00 -0700
committerMel Zuser <mel.zuser@arista.com>2024-05-15 18:48:00 -0700
commit9249c89dc617084640848d4b429311ed3dc152d9 (patch)
treec06c38e62dc40936a2e416e8edfb2603d91f786b
parent7cfaf057e35b7bb329ffff344e30fdfc850566c3 (diff)
build: fix build when gc is disabled
Change-Id: I8d3eb8874a4138668011b525c3b400a55a1f4866
-rw-r--r--src/libcmd/repl.cc4
1 files changed, 4 insertions, 0 deletions
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<Value *> replOverlaysEvalFunction =
+ #if HAVE_BOEHMGC
std::allocate_shared<Value *>(traceable_allocator<Value *>(), nullptr);
+ #else
+ std::make_shared<Value *>(nullptr);
+ #endif
/**
* Get the `info` AttrSet that's passed as the first argument to each