Whamcloud - gitweb
* Commit small patch for lnet to allow Lustre to build against a 2.6.12 kernel.
authorpjkirner <pjkirner>
Wed, 28 Sep 2005 00:01:08 +0000 (00:01 +0000)
committerpjkirner <pjkirner>
Wed, 28 Sep 2005 00:01:08 +0000 (00:01 +0000)
(From adliger)

lnet/include/libcfs/linux/kp30.h
lnet/include/libcfs/linux/libcfs.h
lnet/klnds/socklnd/socklnd_lib-linux.c

index 84e1c0d..5f9d13a 100644 (file)
@@ -119,7 +119,7 @@ do {                                                                    \
 #define PORTAL_SYMBOL_REGISTER(x) inter_module_register(#x, THIS_MODULE, &x)
 #define PORTAL_SYMBOL_UNREGISTER(x) inter_module_unregister(#x)
 
-#define PORTAL_SYMBOL_GET(x) ((typeof(&x))inter_module_get(#x))
+#define PORTAL_SYMBOL_GET(x) inter_module_get(#x)
 #define PORTAL_SYMBOL_PUT(x) inter_module_put(#x)
 
 #define PORTAL_MODULE_USE       MOD_INC_USE_COUNT
index 29bcce3..1351add 100644 (file)
@@ -88,7 +88,7 @@ struct ptldebug_header {
 
 #define LUSTRE_TRACE_SIZE (THREAD_SIZE >> 5)
 
-#ifdef __KERNEL__
+#if defined(__KERNEL__) && !defined(__x86_64__)
 # ifdef  __ia64__
 #  define CDEBUG_STACK (THREAD_SIZE -                                      \
                         ((unsigned long)__builtin_dwarf_cfa() &            \
index 294edbf..963aa9f 100644 (file)
@@ -653,6 +653,8 @@ struct tcp_opt *sock2tcp_opt(struct sock *sk)
 {
         return &(sk->tp_pinfo.af_tcp);
 }
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10))
+#define sock2tcp_opt(sk) tcp_sk(sk)
 #else
 struct tcp_opt *sock2tcp_opt(struct sock *sk)
 {
@@ -665,7 +667,11 @@ void
 ksocknal_lib_push_conn (ksock_conn_t *conn)
 {
         struct sock    *sk;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11))
         struct tcp_opt *tp;
+#else
+        struct tcp_sock *tp;
+#endif
         int             nonagle;
         int             val = 1;
         int             rc;