]> bbs.cooldavid.org Git - jme.git/commitdiff
Fix CentOS compile warnings
authorGuo-Fu Tseng <cooldavid@cooldavid.org>
Tue, 28 Jun 2011 18:19:28 +0000 (02:19 +0800)
committerGuo-Fu Tseng <cooldavid@cooldavid.org>
Tue, 28 Jun 2011 18:19:28 +0000 (02:19 +0800)
jme.h

diff --git a/jme.h b/jme.h
index 3dafe833ba2b284696f8adcb60f47995877fb3ec..a5d870fc3f550263aed506921f5a85d619dfacb8 100644 (file)
--- a/jme.h
+++ b/jme.h
        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