From: David S. Miller Date: Tue, 23 Apr 2013 19:39:03 +0000 (-0400) Subject: netlink: Fix build with mmap disabled. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3dec2246c2ff11beb24ca1950f074b2bcbc85953;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git netlink: Fix build with mmap disabled. net/netlink/diag.c: In function 'sk_diag_put_rings_cfg': net/netlink/diag.c:28:17: error: 'struct netlink_sock' has no member named 'pg_vec_lock' net/netlink/diag.c:29:29: error: 'struct netlink_sock' has no member named 'rx_ring' net/netlink/diag.c:31:30: error: 'struct netlink_sock' has no member named 'tx_ring' net/netlink/diag.c:33:19: error: 'struct netlink_sock' has no member named 'pg_vec_lock' Reported-by: Randy Dunlap Signed-off-by: David S. Miller --- diff --git a/net/netlink/diag.c b/net/netlink/diag.c index 4e4aa471cd05..1af29624b92f 100644 --- a/net/netlink/diag.c +++ b/net/netlink/diag.c @@ -7,6 +7,7 @@ #include "af_netlink.h" +#ifdef CONFIG_NETLINK_MMAP static int sk_diag_put_ring(struct netlink_ring *ring, int nl_type, struct sk_buff *nlskb) { @@ -34,6 +35,12 @@ static int sk_diag_put_rings_cfg(struct sock *sk, struct sk_buff *nlskb) return ret; } +#else +static int sk_diag_put_rings_cfg(struct sock *sk, struct sk_buff *nlskb) +{ + return 0; +} +#endif static int sk_diag_dump_groups(struct sock *sk, struct sk_buff *nlskb) {