summaryrefslogtreecommitdiff
path: root/nix/0001-repl.cc-Check-for-HAVE_BOEHMGC.patch
blob: 9aade59e369057d3d0345faee4f5e7e03838c151 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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