]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests: cgroup: Fix compilation on pre-cgroupns kernels
authorMichal Koutný <mkoutny@suse.com>
Tue, 17 Jun 2025 13:36:56 +0000 (15:36 +0200)
committerTejun Heo <tj@kernel.org>
Tue, 17 Jun 2025 18:13:25 +0000 (08:13 -1000)
The test would be skipped because of nsdelegate, so the defined value is
not used (0 is always acceptable).

Signed-off-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
tools/testing/selftests/cgroup/test_core.c

index 452c2abf9794e4016088233b0db29b9d89c0fda0..a360e2eb2eefdd372738e9dfb9451f2cedc7e18d 100644 (file)
@@ -21,6 +21,9 @@
 #include "cgroup_util.h"
 
 static bool nsdelegate;
+#ifndef CLONE_NEWCGROUP
+#define CLONE_NEWCGROUP 0
+#endif
 
 static int touch_anon(char *buf, size_t size)
 {