summary refs log tree commit diff
path: root/nix/libstore/globals.hh
diff options
context:
space:
mode:
Diffstat (limited to 'nix/libstore/globals.hh')
-rw-r--r--nix/libstore/globals.hh7
1 files changed, 5 insertions, 2 deletions
diff --git a/nix/libstore/globals.hh b/nix/libstore/globals.hh
index 81cf2f52d4..2439936959 100644
--- a/nix/libstore/globals.hh
+++ b/nix/libstore/globals.hh
@@ -1,5 +1,6 @@
 #pragma once
 
+#include "config.h"
 #include "types.hh"
 
 #include <map>
@@ -11,8 +12,10 @@ namespace nix {
 enum CompressionType
 {
     COMPRESSION_NONE = 0,
-    COMPRESSION_GZIP = 1,
-    COMPRESSION_BZIP2 = 2
+    COMPRESSION_GZIP = 1
+#if HAVE_BZLIB_H
+    , COMPRESSION_BZIP2 = 2
+#endif
 };
 
 struct Settings {