From 672ee882318f3ae97de068a44e4c09bdf82d04ef Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Mon, 12 Dec 2022 23:31:30 +0100 Subject: support building with --enable-gc=no Some minor changes fixing the build without boehm. Fixes NixOS#6250 --- src/libexpr/eval.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') 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(traceable_allocator(), nullptr)) , env1AllocCache(std::allocate_shared(traceable_allocator(), nullptr)) -#else - , valueAllocCache(std::make_shared(nullptr)) - , env1AllocCache(std::make_shared(nullptr)) #endif , baseEnv(allocEnv(128)) , staticBaseEnv{std::make_shared(false, nullptr)} -- cgit v1.2.3