aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRick van Schijndel <rol3517@gmail.com>2022-12-12 23:31:30 +0100
committerRick van Schijndel <rol3517@gmail.com>2022-12-12 23:31:30 +0100
commit672ee882318f3ae97de068a44e4c09bdf82d04ef (patch)
tree3130c7669ebe8a5b69b8df8e7a9697af6454aa7b /src
parente408af82ab71d870f854efe417abf1400567e1f1 (diff)
support building with --enable-gc=no
Some minor changes fixing the build without boehm. Fixes NixOS#6250
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/eval.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 6955aacbf..515987db6 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -45,7 +45,7 @@ static char * allocString(size_t size)
#if HAVE_BOEHMGC
t = (char *) GC_MALLOC_ATOMIC(size);
#else
- t = malloc(size);
+ t = (char *) malloc(size);
#endif
if (!t) throw std::bad_alloc();
return t;
@@ -471,9 +471,6 @@ EvalState::EvalState(
#if HAVE_BOEHMGC
, valueAllocCache(std::allocate_shared<void *>(traceable_allocator<void *>(), nullptr))
, env1AllocCache(std::allocate_shared<void *>(traceable_allocator<void *>(), nullptr))
-#else
- , valueAllocCache(std::make_shared<void *>(nullptr))
- , env1AllocCache(std::make_shared<void *>(nullptr))
#endif
, baseEnv(allocEnv(128))
, staticBaseEnv{std::make_shared<StaticEnv>(false, nullptr)}