*/
#define DEBUG_SUBSYSTEM S_LNET
+#ifdef HAVE_COMPAT_RDMA
+#include <linux/compat-2.6.h>
+#endif
#include <linux/if.h>
#include <linux/in.h>
#include <linux/net.h>
sock_filp = sock_alloc_file(sock, 0);
# endif
#endif
- if (!sock_filp) {
- rc = -ENOMEM;
+ if (IS_ERR(sock_filp)) {
+ rc = PTR_ERR(sock_filp);
sock_release(sock);
goto out;
}
return rc;
}
+#ifndef HAVE_SK_SLEEP
+static inline wait_queue_head_t *sk_sleep(struct sock *sk)
+{
+ return sk->sk_sleep;
+}
+#endif
+
int
lnet_sock_accept(struct socket **newsockp, struct socket *sock)
{