Skip to content

Commit 3dec224

Browse files
committed
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 <rdunlap@infradead.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent c002090 commit 3dec224

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎net/netlink/diag.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#include "af_netlink.h"
99

10+
#ifdef CONFIG_NETLINK_MMAP
1011
static int sk_diag_put_ring(struct netlink_ring *ring, int nl_type,
1112
struct sk_buff *nlskb)
1213
{
@@ -34,6 +35,12 @@ static int sk_diag_put_rings_cfg(struct sock *sk, struct sk_buff *nlskb)
3435

3536
return ret;
3637
}
38+
#else
39+
static int sk_diag_put_rings_cfg(struct sock *sk, struct sk_buff *nlskb)
40+
{
41+
return 0;
42+
}
43+
#endif
3744

3845
static int sk_diag_dump_groups(struct sock *sk, struct sk_buff *nlskb)
3946
{

0 commit comments

Comments
 (0)