From 2395d8ca6a6f18acc76e328b6cb43af6786dbcaf Mon Sep 17 00:00:00 2001 From: marta Date: Tue, 14 Jul 2009 13:11:22 +0000 Subject: [PATCH] Fix the compilation under Linux x86_64. --- dummynet/in_cksum.c | 4 ++++ glue.h | 1 + 2 files changed, 5 insertions(+) diff --git a/dummynet/in_cksum.c b/dummynet/in_cksum.c index ca56508..8972cef 100644 --- a/dummynet/in_cksum.c +++ b/dummynet/in_cksum.c @@ -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 --- 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 #include /* struct in_addr */ +#include /* struct in_addr */ #include /* * LIST_HEAD in queue.h conflict with linux/list.h -- 2.43.0