From c607b2ed84929e143d9fb5653c4b5d0109147cde Mon Sep 17 00:00:00 2001 From: Glauber Costa Date: Fri, 16 Dec 2011 00:52:00 +0000 Subject: net: fix compilation with !CONFIG_NET Reported-by: Randy Dunlap Signed-off-by: Glauber Costa CC: Hiroyouki Kamezawa CC: David S. Miller CC: Eric Dumazet CC: Stephen Rothwell Signed-off-by: David S. Miller --- include/net/sock.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/net') diff --git a/include/net/sock.h b/include/net/sock.h index 6fe0dae8145..3144c795064 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 -- cgit v1.2.3