From: Chen Gang <gang.chen@asianux•com>
To: David Miller <davem@davemloft•net>,
kaber@trash•net, xemul@parallels•com, avagin@openvz•org,
netdev <netdev@vger•kernel.org>
Subject: [PATCH net-next] netlink: compiling issue, need a dummy function sk_diag_put_rings_cfg when CONFIG_NETLINK_MMAP disabled
Date: Wed, 24 Apr 2013 16:09:43 +0800 [thread overview]
Message-ID: <51779347.2000808@asianux.com> (raw)
When disable CONFIG_NETLINK_MMAP, need a dummy function for
sk_diag_put_rings_cfg, or will cause compiling issue.
Signed-off-by: Chen Gang <gang.chen@asianux•com>
---
net/netlink/diag.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/net/netlink/diag.c b/net/netlink/diag.c
index 4e4aa47..d0ab090 100644
--- a/net/netlink/diag.c
+++ b/net/netlink/diag.c
@@ -7,6 +7,8 @@
#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)
{
@@ -35,6 +37,15 @@ static int sk_diag_put_rings_cfg(struct sock *sk, struct sk_buff *nlskb)
return ret;
}
+#else /* !CONFIG_NETLINK_MMAP */
+
+static int sk_diag_put_rings_cfg(struct sock *sk, struct sk_buff *nlskb)
+{
+ return 0;
+}
+
+#endif /* CONFIG_NETLINK_MMAP */
+
static int sk_diag_dump_groups(struct sock *sk, struct sk_buff *nlskb)
{
struct netlink_sock *nlk = nlk_sk(sk);
--
1.7.7.6
next reply other threads:[~2013-04-24 8:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-24 8:09 Chen Gang [this message]
2013-04-24 8:11 ` [PATCH net-next] netlink: compiling issue, need a dummy function sk_diag_put_rings_cfg when CONFIG_NETLINK_MMAP disabled David Miller
2013-04-24 8:20 ` Chen Gang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51779347.2000808@asianux.com \
--to=gang.chen@asianux$(echo .)com \
--cc=avagin@openvz$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=kaber@trash$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
--cc=xemul@parallels$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox