diff options
author | Rick van Schijndel <rol3517@gmail.com> | 2022-12-12 23:31:30 +0100 |
---|---|---|
committer | Rick van Schijndel <rol3517@gmail.com> | 2022-12-12 23:31:30 +0100 |
commit | 672ee882318f3ae97de068a44e4c09bdf82d04ef (patch) | |
tree | 3130c7669ebe8a5b69b8df8e7a9697af6454aa7b /src | |
parent | e408af82ab71d870f854efe417abf1400567e1f1 (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.cc | 5 |
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)} |