Netdev List
 help / color / mirror / Atom feed
* [PATCH] net: more #ifdef CONFIG_COMPAT
@ 2008-08-26  2:47 Alexey Dobriyan
  2008-08-28  9:54 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2008-08-26  2:47 UTC (permalink / raw)
  To: davem; +Cc: netdev

All users of struct proto::compat_[gs]etsockopt and
struct inet_connection_sock_af_ops::compat_[gs]etsockopt are under
#ifdef already, so use it in structure definition too.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 include/net/inet_connection_sock.h |    2 ++
 include/net/sock.h                 |    2 ++
 2 files changed, 4 insertions(+)

--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -51,12 +51,14 @@ struct inet_connection_sock_af_ops {
 				  char __user *optval, int optlen);
 	int	    (*getsockopt)(struct sock *sk, int level, int optname, 
 				  char __user *optval, int __user *optlen);
+#ifdef CONFIG_COMPAT
 	int	    (*compat_setsockopt)(struct sock *sk,
 				int level, int optname,
 				char __user *optval, int optlen);
 	int	    (*compat_getsockopt)(struct sock *sk,
 				int level, int optname,
 				char __user *optval, int __user *optlen);
+#endif
 	void	    (*addr2sockaddr)(struct sock *sk, struct sockaddr *);
 	int	    (*bind_conflict)(const struct sock *sk,
 				     const struct inet_bind_bucket *tb);
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -532,6 +532,7 @@ struct proto {
 	int			(*getsockopt)(struct sock *sk, int level, 
 					int optname, char __user *optval, 
 					int __user *option);  	 
+#ifdef CONFIG_COMPAT
 	int			(*compat_setsockopt)(struct sock *sk,
 					int level,
 					int optname, char __user *optval,
@@ -540,6 +541,7 @@ struct proto {
 					int level,
 					int optname, char __user *optval,
 					int __user *option);
+#endif
 	int			(*sendmsg)(struct kiocb *iocb, struct sock *sk,
 					   struct msghdr *msg, size_t len);
 	int			(*recvmsg)(struct kiocb *iocb, struct sock *sk,


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: more #ifdef CONFIG_COMPAT
  2008-08-26  2:47 [PATCH] net: more #ifdef CONFIG_COMPAT Alexey Dobriyan
@ 2008-08-28  9:54 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-08-28  9:54 UTC (permalink / raw)
  To: adobriyan; +Cc: netdev

From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Tue, 26 Aug 2008 06:47:21 +0400

> All users of struct proto::compat_[gs]etsockopt and
> struct inet_connection_sock_af_ops::compat_[gs]etsockopt are under
> #ifdef already, so use it in structure definition too.
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>

Applied to net-next-2.6, thanks Alexey.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-28  9:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-26  2:47 [PATCH] net: more #ifdef CONFIG_COMPAT Alexey Dobriyan
2008-08-28  9:54 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox