Fix the compilation under Linux x86_64.
authormarta <marta@8c455092-636d-4788-adf5-e71def0336e8>
Tue, 14 Jul 2009 13:11:22 +0000 (13:11 +0000)
committermarta <marta@8c455092-636d-4788-adf5-e71def0336e8>
Tue, 14 Jul 2009 13:11:22 +0000 (13:11 +0000)
dummynet/in_cksum.c
glue.h

index ca56508..8972cef 100644 (file)
@@ -88,7 +88,11 @@ in_cksum(struct mbuf *m, int len)
                /*
                 * Force to even boundary.
                 */
+#if defined(CONFIG_X86_64)
+               if ((1 & (long) w) && (mlen > 0)) {
+#else
                if ((1 & (int) w) && (mlen > 0)) {
+#endif
                        REDUCE;
                        sum <<= 8;
                        s_util.c[0] = *(u_char *)w;
diff --git a/glue.h b/glue.h
index 8a6a014..d3571a4 100644 (file)
--- a/glue.h
+++ b/glue.h
@@ -86,6 +86,7 @@ enum sopt_dir { SOPT_GET, SOPT_SET };
                                 * so early include this file (to be solved) */
 #include <linux/list.h>
 #include <linux/in.h>          /* struct in_addr */
+#include <linux/in6.h>         /* struct in_addr */
 #include <linux/icmp.h>
 /*
  * LIST_HEAD in queue.h conflict with linux/list.h