Commit 0fe98c25 authored by Robert Schmidt's avatar Robert Schmidt

Avoid RHEL_RELEASE_VERSION: not defined in Ubuntu

parent 2124e43d
...@@ -41,8 +41,7 @@ ...@@ -41,8 +41,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <linux/version.h> #include <linux/version.h>
#if defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,4) \ #if defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= 1796 && RHEL_RELEASE_CODE != 2403
&& RHEL_RELEASE_CODE != RHEL_RELEASE_VERSION(9,99)
#include <lapacke/lapacke_utils.h> #include <lapacke/lapacke_utils.h>
#include <lapacke/lapacke.h> #include <lapacke/lapacke.h>
#else #else
......
...@@ -14,8 +14,7 @@ data storage. */ ...@@ -14,8 +14,7 @@ data storage. */
#include <cblas.h> #include <cblas.h>
#include <string.h> #include <string.h>
#include <linux/version.h> #include <linux/version.h>
#if defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,4) \ #if defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= 1796 && RHEL_RELEASE_CODE != 2403
&& RHEL_RELEASE_CODE != RHEL_RELEASE_VERSION(9,99)
#include <lapacke/lapacke_utils.h> #include <lapacke/lapacke_utils.h>
#include <lapacke/lapacke.h> #include <lapacke/lapacke.h>
#else #else
......
...@@ -199,8 +199,7 @@ int nas_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -199,8 +199,7 @@ int nas_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
// End debug information // End debug information
netif_stop_queue(dev); netif_stop_queue(dev);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) \ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) \
|| (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,4) \ || (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= 1796 && RHEL_RELEASE_CODE != 2403)
&& RHEL_RELEASE_CODE != RHEL_RELEASE_VERSION(9,99))
netif_trans_update(dev); netif_trans_update(dev);
#else #else
dev->trans_start = jiffies; dev->trans_start = jiffies;
...@@ -270,8 +269,7 @@ void nas_tx_timeout(struct net_device *dev) ...@@ -270,8 +269,7 @@ void nas_tx_timeout(struct net_device *dev)
// (struct nas_priv *)(dev->priv)->stats.tx_errors++; // (struct nas_priv *)(dev->priv)->stats.tx_errors++;
(priv->stats).tx_errors++; (priv->stats).tx_errors++;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) \ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) \
|| (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,4) \ || (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= 1796 && RHEL_RELEASE_CODE != 2403)
&& RHEL_RELEASE_CODE != RHEL_RELEASE_VERSION(9,99))
netif_trans_update(dev); netif_trans_update(dev);
#else #else
dev->trans_start = jiffies; dev->trans_start = jiffies;
...@@ -290,8 +288,7 @@ static const struct net_device_ops nasmesh_netdev_ops = { ...@@ -290,8 +288,7 @@ static const struct net_device_ops nasmesh_netdev_ops = {
.ndo_set_config = nas_set_config, .ndo_set_config = nas_set_config,
.ndo_do_ioctl = nas_CTL_ioctl, .ndo_do_ioctl = nas_CTL_ioctl,
#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,11,0) \ #if LINUX_VERSION_CODE <= KERNEL_VERSION(3,11,0) \
|| (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,5) \ || (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= 1797 && RHEL_RELEASE_CODE != 2403)
&& RHEL_RELEASE_CODE != RHEL_RELEASE_VERSION(9,99))
.extended.ndo_change_mtu = nas_change_mtu, .extended.ndo_change_mtu = nas_change_mtu,
#else #else
.ndo_change_mtu = nas_change_mtu, .ndo_change_mtu = nas_change_mtu,
......
...@@ -240,8 +240,7 @@ int ue_ip_hard_start_xmit(struct sk_buff *skb_pP, struct net_device *dev_pP) { ...@@ -240,8 +240,7 @@ int ue_ip_hard_start_xmit(struct sk_buff *skb_pP, struct net_device *dev_pP) {
// End debug information // End debug information
netif_stop_queue(dev_pP); netif_stop_queue(dev_pP);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) \ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) \
|| (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,4) \ || (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= 1796 && RHEL_RELEASE_CODE != 2403)
&& RHEL_RELEASE_CODE != RHEL_RELEASE_VERSION(9,99))
netif_trans_update(dev_pP); netif_trans_update(dev_pP);
#else #else
dev_pP->trans_start = jiffies; dev_pP->trans_start = jiffies;
...@@ -317,9 +316,8 @@ void ue_ip_tx_timeout(struct net_device *dev_pP) ...@@ -317,9 +316,8 @@ void ue_ip_tx_timeout(struct net_device *dev_pP)
printk("[UE_IP_DRV][%s] begin\n", __FUNCTION__); printk("[UE_IP_DRV][%s] begin\n", __FUNCTION__);
// (ue_ip_priv_t *)(dev_pP->priv_p)->stats.tx_errors++; // (ue_ip_priv_t *)(dev_pP->priv_p)->stats.tx_errors++;
(priv_p->stats).tx_errors++; (priv_p->stats).tx_errors++;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) \\ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) \
|| (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,4) \ || (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= 1796 && RHEL_RELEASE_CODE != 2403)
&& RHEL_RELEASE_CODE != RHEL_RELEASE_VERSION(9,99))
netif_trans_update(dev_pP); netif_trans_update(dev_pP);
#else #else
dev_pP->trans_start = jiffies; dev_pP->trans_start = jiffies;
...@@ -337,8 +335,7 @@ static const struct net_device_ops ue_ip_netdev_ops = { ...@@ -337,8 +335,7 @@ static const struct net_device_ops ue_ip_netdev_ops = {
.ndo_set_mac_address = ue_ip_set_mac_address, .ndo_set_mac_address = ue_ip_set_mac_address,
.ndo_set_config = ue_ip_set_config, .ndo_set_config = ue_ip_set_config,
.ndo_do_ioctl = NULL, .ndo_do_ioctl = NULL,
#if defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,5) \ #if defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= 1797 && RHEL_RELEASE_CODE != 2403
&& RHEL_RELEASE_CODE != RHEL_RELEASE_VERSION(9,99)
.extended.ndo_change_mtu = ue_ip_change_mtu, .extended.ndo_change_mtu = ue_ip_change_mtu,
#else #else
.ndo_change_mtu = ue_ip_change_mtu, .ndo_change_mtu = ue_ip_change_mtu,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment