TP-LINK_Archer_T4U_v3 icon indicating copy to clipboard operation
TP-LINK_Archer_T4U_v3 copied to clipboard

Not compiling on Ubuntu 18:04 LTS

Open angielumezeanu opened this issue 4 years ago • 3 comments

I hit an error when compiling on: Linux 4.15.0-42-generic #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

following error:

/TP-LINK_Archer_T4U_v3-master/os_dep/linux/rtw_android.c: In function ‘rtw_android_priv_cmd’ /TP-LINK_Archer_T4U_v3-master/os_dep/linux/rtw_android.c:622:49: error: macro "access_ok" requires 3 arguments, but only 2 given if (!access_ok(priv_cmd.buf, priv_cmd.total_len)) { ^ /TP-LINK_Archer_T4U_v3-master/os_dep/linux/rtw_android.c:622:7: error: ‘access_ok’ undeclared (first use in this function) if (!access_ok(priv_cmd.buf, priv_cmd.total_len)) {

After commenting the body of function "rtw_android_priv_cmd" I've got it up and running :)

Can we do something here to get it compiling on first try ? Thanks for your effort.

angielumezeanu avatar Aug 04 '20 14:08 angielumezeanu

Hello, thank you for the bug reporting!

Unfortunately (or fortunately :)), I don't have such device anymore.
I would be glad if you created a pull request that works for you :)

Red-Eyed avatar Aug 04 '20 14:08 Red-Eyed

I have faced the same issue and it seems that if you change the code on /TP-LINK_Archer_T4U_v3-master/os_dep/linux/rtw_android.c:622 to if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) {, then the code will compile and network runs smoothly for now. Not sure if it's the correct way because I am not so familiar with these things but you may try that.

qiaoruiyt avatar Aug 29 '20 15:08 qiaoruiyt

The problem was the same with the stock linux kernel version 4.19.0-13-amd64 of Debian 10.7

It's a regression introduced by commit 2280f9c8a5a7784b615614a72d380dea489d36f2

I have fixed it by a simple compiler condition, available in the pull request #10

zag-adka avatar Dec 10 '20 17:12 zag-adka