From: Dor Laor <[EMAIL PROTECTED]> Also add #else for initializing the virtio_net_hdr
Signed-off-by: Dor Laor <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/external-module-compat.h b/external-module-compat.h index 75c4fd0..9c93464 100644 --- a/external-module-compat.h +++ b/external-module-compat.h @@ -63,6 +63,8 @@ do { \ } while(0) #define netif_rx_schedule(dev, napi) netif_rx_schedule(dev) +#define COMPAT_csum_offset + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) #define scsi_cmd_ioctl(filp, rq, gendisk, cmd, data) \ @@ -85,8 +87,6 @@ do { \ #define list_first_entry(ptr, type, member) \ list_entry((ptr)->next, type, member) -#define COMPAT_csum_offset - static inline void * __must_check krealloc(const void *data, size_t size, gfp_t gfp) { diff --git a/hack-module.awk b/hack-module.awk index bd63fb9..41ba60d 100644 --- a/hack-module.awk +++ b/hack-module.awk @@ -106,7 +106,10 @@ } /ip_summed == CHECKSUM_PARTIAL\)/ { - print "#ifndef COMPAT_csum_offset"; + print "#ifdef COMPAT_csum_offset"; + print "\thdr->flags = 0;" + print "\thdr->csum_offset = hdr->csum_start = 0;" + print "#else" need_endif_indent_brace = 1; } ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ kvm-commits mailing list kvm-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-commits