RE: compiling snull.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 30 Sep 2002, grace baldonasa wrote:

> This is exactly the error:
> 
> macro "dev_kfree_skb" passed two arguments but takes
> just 1.

This was one of the classic screw-ups in changing the Linux network
API.  You should never change the arg count to a function and leave its
name the same.  It make breaks both backwards and forward compatibility.

Here is the code I use in "kern_compat.h" to work around this bogosity

________________
/* The arg count changed, but function name did not.
   We cover that bad choice by defining a new name.
*/
#if LINUX_VERSION_CODE < 0x20159
#define dev_free_skb(skb) dev_kfree_skb(skb, FREE_WRITE);
#define dev_free_skb_irq(skb) dev_kfree_skb(skb, FREE_WRITE);
#elif LINUX_VERSION_CODE < 0x20400
#define dev_free_skb(skb) dev_kfree_skb(skb);
#define dev_free_skb_irq(skb) dev_kfree_skb(skb);
#else
#define dev_free_skb(skb) dev_kfree_skb(skb);
#define dev_free_skb_irq(skb) dev_kfree_skb_irq(skb);
#endif
________________

-- 
Donald Becker				becker@scyld.com
Scyld Computing Corporation		http://www.scyld.com
410 Severn Ave. Suite 210		Second Generation Beowulf Clusters
Annapolis MD 21403			410-990-9993

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux