[PATCH 44/45] C++: Can't declare unsized-array in struct cgroup

David Howells
2018-04-01T20:44:43Z

struct cgroup can't be defined with an unsized array in it (ancestors_ids)
as the struct is embedded in another struct. Fix it to have a 0 in there.

Signed-off-by: David Howells <dhowells@redhat.com>
---

include/linux/cgroup-defs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h
index 9f242b876fde..86fe9c6c6466 100644
--- a/include/linux/cgroup-defs.h
+++ b/include/linux/cgroup-defs.h
@@ -428,7 +428,7 @@ struct cgroup {
struct cgroup_bpf bpf;

/* ids of the ancestors at each level including self */
- int ancestor_ids[];
+ int ancestor_ids[0];
};

/*