瀏覽代碼

Fixes for RHEL and CENTOS compile

RHEL and CENTOS made some upstream patches for 4.18, thats why I make this patch.
Suleyman Poyraz 4 年之前
父節點
當前提交
a20593ed4c
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      os_dep/linux/os_intfs.c
  2. 1 1
      os_dep/linux/rtw_android.c

+ 1 - 1
os_dep/linux/os_intfs.c

@@ -1327,7 +1327,7 @@ unsigned int rtw_classify8021d(struct sk_buff *skb)
 }
 
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) || defined(RHEL_RELEASE_CODE) || defined(CENTOS_RELEASE_CODE)
 static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb
     , struct net_device *sb_dev
     #if (LINUX_VERSION_CODE < KERNEL_VERSION(5,2,0))

+ 1 - 1
os_dep/linux/rtw_android.c

@@ -662,7 +662,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
 		goto exit;
 	}
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)) || defined(RHEL_RELEASE_CODE) || defined(CENTOS_RELEASE_CODE)
 	if (!access_ok(priv_cmd.buf, priv_cmd.total_len)) {
 #else
 	if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) {