[openib-general] [PATCH][SDP] Allow SDP to compile on 2.6.12-rc3
Tom Duffy
tduffy at sun.com
Thu Apr 21 15:31:06 PDT 2005
The sock structure was changed in 2.6.12-rc? and SDP no longer compiles
against it. This patch allows SDP to build with either 2.6.11 or
2.6.12-rc3 as we must preserve building on current stable tree.
Signed-off-by: Tom Duffy <tduffy at sun.com>
Index: linux-2.6.12-rc3-openib/drivers/infiniband/ulp/sdp/sdp_pass.c
===================================================================
--- linux-2.6.12-rc3-openib/drivers/infiniband/ulp/sdp/sdp_pass.c (revision 2207)
+++ linux-2.6.12-rc3-openib/drivers/infiniband/ulp/sdp/sdp_pass.c (working copy)
@@ -356,13 +356,23 @@ static int sdp_cm_listen_lookup(struct s
*/
sk->sk_lingertime = listen_sk->sk_lingertime;
sk->sk_rcvlowat = listen_sk->sk_rcvlowat;
+/* XXX Remove once 2.6.12 is released */
+#if ( LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,11) )
sk->sk_debug = listen_sk->sk_debug;
sk->sk_localroute = listen_sk->sk_localroute;
+ sk->sk_rcvtstamp = listen_sk->sk_rcvtstamp;
+#else
+ if (sock_flag(sk, SOCK_DBG))
+ sock_set_flag(listen_sk, SOCK_DBG);
+ if (sock_flag(sk, SOCK_LOCALROUTE))
+ sock_set_flag(listen_sk, SOCK_LOCALROUTE);
+ if (sock_flag(sk, SOCK_RCVTSTAMP))
+ sock_set_flag(listen_sk, SOCK_RCVTSTAMP);
+#endif
sk->sk_sndbuf = listen_sk->sk_sndbuf;
sk->sk_rcvbuf = listen_sk->sk_rcvbuf;
sk->sk_no_check = listen_sk->sk_no_check;
sk->sk_priority = listen_sk->sk_priority;
- sk->sk_rcvtstamp = listen_sk->sk_rcvtstamp;
sk->sk_rcvtimeo = listen_sk->sk_rcvtimeo;
sk->sk_sndtimeo = listen_sk->sk_sndtimeo;
sk->sk_reuse = listen_sk->sk_reuse;
More information about the general
mailing list