As a temporary fix (I couldnt find where CONFIG_COMPAT was defined in the 4.4 lts xenial kernel in 16.04.1), I added the following to the very top of /usr/src/rtl8812au-4.3.8.12175.20140902+dfsg/os_dep/linux/rtw_android.c :
```
# Note: This not a correct general purpose solution but for building on amd64 16.04.2 it works fine.
#ifdef CONFIG_COMPAT
#undef CONFIG_COMPAT
#endif
```
This allowed me to build the driver on amd64 16.04.2, followed by the following:
Can confirm, I have the same issue.
As a temporary fix (I couldnt find where CONFIG_COMPAT was defined in the 4.4 lts xenial kernel in 16.04.1), I added the following to the very top of /usr/src/ rtl8812au- 4.3.8.12175. 20140902+ dfsg/os_ dep/linux/ rtw_android. c :
```
# Note: This not a correct general purpose solution but for building on amd64 16.04.2 it works fine.
#ifdef CONFIG_COMPAT
#undef CONFIG_COMPAT
#endif
```
This allowed me to build the driver on amd64 16.04.2, followed by the following:
``` 4.3.8.12175. 20140902+ dfsg --all 20140902+ dfsg
sudo dkms remove -m rtl8812au/
sudo dkms install -m rtl8812au -v 4.3.8.12175.
sudo modprobe -r 8812au
sudo modprobe 8812au
# unplug/replug the usb device
sudo systemctl restart NetworkManager
```
The driver will now work with the 4.8 HWE kernel on 16.04.2 and so far the networking in general seems far more stable than with the xenial kernel.