From 4975608e5c4a0c2fcbf12f6f0b524d56140651b3 Mon Sep 17 00:00:00 2001 From: brektrou <48123110+brektrou@users.noreply.github.com> Date: Fri, 15 Mar 2019 09:08:57 +0700 Subject: [PATCH] Fix build error for Linux 5.0 --- os_dep/linux/rtw_android.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/os_dep/linux/rtw_android.c b/os_dep/linux/rtw_android.c index 9c9f550..c733f9d 100755 --- a/os_dep/linux/rtw_android.c +++ b/os_dep/linux/rtw_android.c @@ -653,8 +653,9 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) ret = -ENOMEM; goto exit; } - - if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) { + +// Fix build error for Linux 5.0 + if (VENDOR_READ, priv_cmd.buf, priv_cmd.total_len) { RTW_INFO("%s: failed to access memory\n", __FUNCTION__); ret = -EFAULT; goto exit;