From: Guo-Fu Tseng Date: Tue, 28 Jun 2011 18:19:28 +0000 (+0800) Subject: Fix CentOS compile warnings X-Git-Tag: bp-1.0.8.1~3 X-Git-Url: https://bbs.cooldavid.org/git/?p=jme.git;a=commitdiff_plain;h=aee7a9f58a8969f434eff0e3d9edac7fdf0c37df Fix CentOS compile warnings --- diff --git a/jme.h b/jme.h index 3dafe83..a5d870f 100644 --- a/jme.h +++ b/jme.h @@ -43,11 +43,11 @@ NETIF_MSG_TX_ERR | \ NETIF_MSG_HW) -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,23) +#ifndef pr_err #define pr_err(fmt, arg...) \ printk(KERN_ERR fmt, ##arg) #endif -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,33) +#ifndef netdev_err #define netdev_err(netdev, fmt, arg...) \ pr_err(fmt, ##arg) #endif @@ -95,11 +95,15 @@ do { \ #define msg_hw(priv, fmt, args...) \ jme_msg(KERN_ERR, hw, priv, fmt, ## args) +#ifndef netif_info #define netif_info(priv, type, dev, fmt, args...) \ msg_ ## type(priv, fmt, ## args) +#endif +#ifndef netif_err #define netif_err(priv, type, dev, fmt, args...) \ msg_ ## type(priv, fmt, ## args) #endif +#endif #ifndef NETIF_F_TSO6 #define NETIF_F_TSO6 0