43 lines
894 B
Diff
43 lines
894 B
Diff
|
From d5c7efae3833b4c8d0012c5f9816ae4b6c28a3e7 Mon Sep 17 00:00:00 2001
|
||
|
From: Eelco Dolstra <edolstra@gmail.com>
|
||
|
Date: Thu, 6 Aug 2020 11:40:41 +0200
|
||
|
Subject: [PATCH] repl.cc: Check for HAVE_BOEHMGC
|
||
|
|
||
|
Fixes #3906.
|
||
|
|
||
|
(cherry picked from commit 59067f0f587f75908c4f990bcbab29340c7f7652)
|
||
|
---
|
||
|
src/nix/repl.cc | 7 ++++++-
|
||
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/nix/repl.cc b/src/nix/repl.cc
|
||
|
index 04bc82cc0..0b696a340 100644
|
||
|
--- a/src/nix/repl.cc
|
||
|
+++ b/src/nix/repl.cc
|
||
|
@@ -31,8 +31,10 @@ extern "C" {
|
||
|
#include "command.hh"
|
||
|
#include "finally.hh"
|
||
|
|
||
|
+#if HAVE_BOEHMGC
|
||
|
#define GC_INCLUDE_NEW
|
||
|
#include <gc/gc_cpp.h>
|
||
|
+#endif
|
||
|
|
||
|
namespace nix {
|
||
|
|
||
|
@@ -44,7 +46,10 @@ namespace nix {
|
||
|
#define ESC_CYA "\033[36m"
|
||
|
#define ESC_END "\033[0m"
|
||
|
|
||
|
-struct NixRepl : gc
|
||
|
+struct NixRepl
|
||
|
+ #if HAVE_BOEHMGC
|
||
|
+ : gc
|
||
|
+ #endif
|
||
|
{
|
||
|
string curDir;
|
||
|
EvalState state;
|
||
|
--
|
||
|
2.28.0
|
||
|
|