From 7274b775af4dc3aab4c579c1450a00209961d20e Mon Sep 17 00:00:00 2001
From: Martin Mares <mj@ucw.cz>
Date: Fri, 16 Feb 2018 13:16:53 +0100
Subject: [PATCH] Compctl: SWAP_LIMIT is off by default

---
 cgroup.c         | 4 ++--
 debian/changelog | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/cgroup.c b/cgroup.c
index 4ed8872..aa63253 100644
--- a/cgroup.c
+++ b/cgroup.c
@@ -9,7 +9,7 @@
 #include "cgroup.h"
 #include "common.h"
 
-#if SWAP_LIMIT
+#ifdef SWAP_LIMIT
 #define MEMSW ".memsw"
 #else
 #define MEMSW
@@ -174,7 +174,7 @@ cgroup_set_mem_limit_twice(const char *chier, const char *cgroup, size_t nlimit,
 int
 cgroup_set_mem_limit(const char *chier, const char *cgroup, size_t nlimit)
 {
-#if SWAP_LIMIT
+#ifdef SWAP_LIMIT
 	/* We need to set both the "normal" and memsw limits, but in such
 	 * order that normal <= memsw always holds. */
 	size_t curlimit = cgroup_get_mem_limit(chier, cgroup);
diff --git a/debian/changelog b/debian/changelog
index 30ef9f1..57b0af7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+compctl (1.2-3) UNRELEASED; urgency=medium
+
+  * Turned off SWAP_LIMIT by default.
+
+ -- Martin Mares <mj@ucw.cz>  Fri, 16 Feb 2018 13:16:34 +0100
+
 compctl (1.2-2) stable; urgency=medium
 
   * Updated packaging for Debian Stretch.
-- 
GitLab