Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Im trying to install drivers for a rosewill RNX-N600UBE wireless card (Ralink RT2870 chipset) on Kali Linux. I downloaded the drivers form their website and unpacked/unzipped them, but now when i try to run the 'make' command i get this error.

/home/fox/System/2011_0427_RT3572_Linux_STA_v2.5.0.0.DPO/os/linux/../../os/linux/rt_linux.c:1156:20: error: incompatible types when assigning to type ‘int’ from type ‘kuid_t’
/home/fox/System/2011_0427_RT3572_Linux_STA_v2.5.0.0.DPO/os/linux/../../os/linux/rt_linux.c:1157:20: error: incompatible types when assigning to type ‘int’ from type ‘kgid_t’
make[4]: *** [/home/fox/System/2011_0427_RT3572_Linux_STA_v2.5.0.0.DPO/os/linux/../../os/linux/rt_linux.o] Error 1
make[3]: *** [_module_/home/fox/System/2011_0427_RT3572_Linux_STA_v2.5.0.0.DPO/os/linux] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2

Im new to linux so any help is appreciated.

share|improve this question
I think you might need a different version of something, maybe the compiler? – PlasmaPower Apr 16 '14 at 13:43

The issue is that one of the kernel headers / interfaces changed in a recent 3.x kernel. Where a UID / GID values were originally referred to as regular integers, they are now structs with a single element. Any code relying on the older definition now will fail to compile until updated to match the new kernel headers.

I'm currently experimenting with patching a similar error in virtualbox-guest-utils for my Ubuntu install; in theory locating and replacing instances of ->i_uid = with ->i_uid.val = or ->i_gid = with ->i_gid.val = on the line numbers reported in the error should fix the problem (but I can't guarantee that at this time as compilation is now failing on a different, unrelated, error for me).

Your best bet is contacting the original author of your code for an updated version of the source that works with the newer kernels.

share|improve this answer
Tested! This DOES work! I changed current_fsuid() to current_fsuid().val – Jonathan Leaders Apr 27 '15 at 0:09
For me, I also had to change current_fsgid() to current_fsgid().val – sand_storm_of_code.txt Oct 14 '15 at 11:22
@JonathanLeaders touché Thanks. However, the patch converting int to kuid_t also seems to do the trick. – enthusiasticgeek Oct 16 '15 at 16:00

I found a fix to the compilation errors in another driver on this website: http://www.arnelborja.com/compiling-rt2870-wifi-driver-in-fedora/

below is the patch content:

--- include/os/rt_linux.h   2013-09-12 13:27:14.000000000 +0800
+++ include/os/rt_linux.h.patched   2014-03-23 11:45:03.907628847 +0800
@@ -279,8 +279,8 @@ typedef struct file* RTMP_OS_FD;

 typedef struct _OS_FS_INFO_
-   int             fsuid;
-   int             fsgid;
+   kuid_t              fsuid;
+   kgid_t              fsgid;
    mm_segment_t    fs;
share|improve this answer
This is a good, working solution for the MT7601U driver, used for the Mediatek/Ralink 148F:7601 chipset, as well. (Yes, I'm just adding these keywords for SEO reasons.) – billyjmc Mar 30 '15 at 3:29

make only reports the errors but they are in fact errors from your compiler (probably gcc):

error: incompatible types when assigning to type ‘int’ from type ‘kuid_t’ 

Basically, your code is buggy or inappropriate for your platform but make functions correctly.

share|improve this answer

This solution worked for me. The procedure I followed was:

  1. I followed the steps for my distribution (Debian Jessie) from here.

  2. I saved de driver for Linux of the manufacturer (which comes with the equipment in the CDROM), and I unzipped it to a folder.

  3. In the folder, I typed make (as root), and I got an error. So, I did the modification above, and it worked.

  4. I typed make install (as root), I rebooted the computer, and the wireless interface was recognized. I configured it and it worked. ;)

My system is: Debian Jessie, kernel 3.16.0-4-amd64, using gnome.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.