From 9196aebe1ee31ab037c76ad1eda362df98c0ce13 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Tue, 24 Feb 2015 09:42:06 -0600 Subject: [PATCH] rtl8188eu: Fix build on kernel version 4.0+ Signed-off-by: Larry Finger --- os_dep/rtw_android.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/os_dep/rtw_android.c b/os_dep/rtw_android.c index 6cf71cc..fdc93ab 100644 --- a/os_dep/rtw_android.c +++ b/os_dep/rtw_android.c @@ -79,9 +79,14 @@ static int g_wifi_on = true; int rtw_android_cmdstr_to_num(char *cmdstr) { int cmd_num; - for (cmd_num = 0; cmd_num < ANDROID_WIFI_CMD_MAX; cmd_num++) - if (0 == strnicmp(cmdstr , android_wifi_cmd_str[cmd_num], - strlen(android_wifi_cmd_str[cmd_num]))) + for(cmd_num=0; cmd_num < ANDROID_WIFI_CMD_MAX; cmd_num++) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)) + if (!strncasecmp(cmdstr, android_wifi_cmd_str[cmd_num], + strlen(android_wifi_cmd_str[cmd_num]))) +#else + if(0 == strnicmp(cmdstr, android_wifi_cmd_str[cmd_num], + strlen(android_wifi_cmd_str[cmd_num]))) +#endif break; return cmd_num; }