chenhaiq / mt7610u_wifi_sta_v3002_dpo_20130916

Modified usb wifi driver for TP_link TL-WDN5200
MIT License
132 stars 116 forks source link

"Implicit declaration of function" - can't build #18

Open melon3r opened 7 years ago

melon3r commented 7 years ago

Hi! I'm trying to build this driver but I'm getting the following error:

~/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpOSFileRead’:
~/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_linux.c:1087:3: error: implicit declaration of function ‘__vfs_read’ [-Werror=implicit-function-declaration]
   return __vfs_read(osfd, pDataPtr, readLen, &osfd->f_pos);
   ^
~/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpOSFileWrite’:
~/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_linux.c:1096:2: error: implicit declaration of function ‘__vfs_write’ [-Werror=implicit-function-declaration]
  return __vfs_write(osfd, pDataPtr, (size_t) writeLen, &osfd->f_pos);
  ^

Any idea about what's going on here?

dsn0327 commented 7 years ago

i fix this with add below on top of the rt_linux.c file.

include <linux/slab.h>

define __vfs_read(a,b,c,d) vfs_read(a,b,c,d)

define __vfs_write(a,b,c,c) vfs_write(a,b,c,d)