From: Guo-Fu Tseng Date: Fri, 24 Feb 2012 03:35:12 +0000 (+0800) Subject: Fix bool type on old kernel X-Git-Tag: bp-1.0.8.9-noasd~1 X-Git-Url: http://bbs.cooldavid.org/git/?p=jme.git;a=commitdiff_plain;h=cc377620b83ee49cf582a56f828765ca40eb2a59 Fix bool type on old kernel --- diff --git a/jme.c b/jme.c index 68aff5f..10f1f04 100644 --- a/jme.c +++ b/jme.c @@ -2069,7 +2069,12 @@ jme_fill_tx_map(struct pci_dev *pdev, struct page *page, u32 page_offset, u32 len, - bool hidma) +#ifdef __NO_BOOL__ + u8 hidma +#else + bool hidma +#endif + ) { dma_addr_t dmaaddr; @@ -2103,7 +2108,11 @@ jme_map_tx_skb(struct jme_adapter *jme, struct sk_buff *skb, int idx) struct jme_ring *txring = &(jme->txring[0]); struct txdesc *txdesc = txring->desc, *ctxdesc; struct jme_buffer_info *txbi = txring->bufinf, *ctxbi; +#ifdef __NO_BOOL__ + u8 hidma = !!(jme->dev->features & NETIF_F_HIGHDMA); +#else bool hidma = jme->dev->features & NETIF_F_HIGHDMA; +#endif int i, nr_frags = skb_shinfo(skb)->nr_frags; int mask = jme->tx_ring_mask; const struct skb_frag_struct *frag; diff --git a/jme.h b/jme.h index 4ee3e0b..e42b5b9 100644 --- a/jme.h +++ b/jme.h @@ -112,6 +112,10 @@ do { \ #define NETIF_F_IPV6_CSUM 0 #endif +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18) +#define __NO_BOOL__ +#endif + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0) #define __USE_NDO_FIX_FEATURES__ #endif