Thread (4 messages) 4 messages, 2 authors, 2011-12-16

[PATCH 2/2] net: fix compilation with !CONFIG_NET

From: Glauber Costa <hidden>
Date: 2011-12-16 10:53:12
Also in: cgroups, netdev
Subsystem: networking [general], networking [sockets], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Kuniyuki Iwashima, Willem de Bruijn, Linus Torvalds

Reported-by: Randy Dunlap <redacted>
Signed-off-by: Glauber Costa <redacted>
CC: Hiroyouki Kamezawa <redacted>
CC: David S. Miller <davem@davemloft.net>
CC: Eric Dumazet <redacted>
CC: Stephen Rothwell <redacted>
---
 include/net/sock.h |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/include/net/sock.h b/include/net/sock.h
index 6fe0dae..3144c79 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -66,8 +66,20 @@
 
 struct cgroup;
 struct cgroup_subsys;
+#ifdef CONFIG_NET
 int mem_cgroup_sockets_init(struct cgroup *cgrp, struct cgroup_subsys *ss);
 void mem_cgroup_sockets_destroy(struct cgroup *cgrp, struct cgroup_subsys *ss);
+#else
+static inline
+int mem_cgroup_sockets_init(struct cgroup *cgrp, struct cgroup_subsys *ss)
+{
+	return 0;
+}
+static inline
+void mem_cgroup_sockets_destroy(struct cgroup *cgrp, struct cgroup_subsys *ss)
+{
+}
+#endif
 /*
  * This structure really needs to be cleaned up.
  * Most of it is for TCP, and not used by any of
-- 
1.7.6.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help