Browse Source

Merge pull request #210 from Zaryob/master

Fixed build for CENTOS and RHEL
Tomás Pinho 4 years ago
parent
commit
7a11dc9a5f
2 changed files with 6 additions and 2 deletions
  1. 3 1
      os_dep/linux/os_intfs.c
  2. 3 1
      os_dep/linux/rtw_android.c

+ 3 - 1
os_dep/linux/os_intfs.c

@@ -1327,7 +1327,9 @@ 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)) || \
+    ( (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,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))

+ 3 - 1
os_dep/linux/rtw_android.c

@@ -662,7 +662,9 @@ 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)) || \
+    ( (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,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)) {