Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build error under Linux 4.10 #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

ahresse
Copy link

@ahresse ahresse commented Aug 16, 2017

An error was raised while compiling with Ubuntu 16.04 (kernel 4.10.0-32-generic):
error: implicit declaration of function ‘is_compat_task‘

An error was raised while compiling with Ubuntu 16.04 (kernel 4.10.0-32-generic):
error: implicit declaration of function ‘is_compat_task‘
@LuxMiranda
Copy link

Had the same issue on Ubuntu 16.04 kernel 4.10.0-32-generic. This fix worked in allowing me to build!

@sloretz
Copy link
Owner

sloretz commented Aug 17, 2017

Thanks for the pull request! Looks like the travis job is fubar, but that's not related to this pull request. It will be a few days before I have time to test this.

Copy link
Owner

@sloretz sloretz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request! For compatibility with older 4 series kernels would you mind removing the definition of is_compat_task and adding #include <linux/compat.h> to the file ./include/drv_types_linux.h instead?

@@ -1171,5 +1171,10 @@ __inline static u8 *myid(struct eeprom_priv *peepriv)
#include <pci_hal.h>
#endif

static inline bool is_compat_task(void)
Copy link
Owner

@sloretz sloretz Aug 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On kernel 4.4 I get a build error complaining about this function being redefined. Looks like kernel 4.10 has a header with a macro that defines this function. Would you mind changing the patch to remove this function, and add an #include <linux/compat.h> instead?

@jamesray1
Copy link

#6

@jamesray1
Copy link

jamesray1 commented Sep 24, 2017

In the meantime (one month after this PR) I'll try cloning ahresse:master.

It also didn't work.

@jamesray1
Copy link

jamesray1 commented Oct 26, 2017

https://github.com/ahresse/rtl8811au/wiki

Testing on Ubuntu 17.04 x64 here.

It seemed to install but unfortunately it didn't work as no WiFi networks appear, while they do in Windows on the same computer, and on my phone. I also tried to manually enter a WiFi connection, entering the SSID, WPA2/PSK passkey and MAC address, but it has never connected.

@jamesray1
Copy link

I guess that I'll have to buy a Ubuntu compatible dongle...

@sloretz
Copy link
Owner

sloretz commented Oct 26, 2017

@jamesray1 Thanks for your feedback. You may want to try the code at https://github.com/diederikdehaas/rtl8812AU

A year ago or so I bought a wifi dongle, and it came with a driver that didn't build on ubuntu xenial. I fixed the issues and uploaded it here in hopes that it would be useful to others like yourself. I no longer use a wifi dongle, so I'm probably not going to write more code for this repo. If you would be willing to fix issues you encounter (start with adding #include <linux/compat.h> to drv_types_linux.h to fix the is_compat_task issue) I would be happy to merge your code so others can take advantage of it.

@jamesray1
Copy link

I bought another dongle that's compatible with Linux. I'll see how that goes. https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.com.au%2Fulk%2Fitm%2F263200219618

@rstecca
Copy link

rstecca commented Aug 28, 2019

This might be redundant but I'm just confirming that this worked for me.
in the files where the error came from I added the following lines:

static inline bool is_compat_task(void) { return in_ia32_syscall() || in_x32_syscall(); }

The files were ./os_dep/linux/ioctl_linux.c and ./os_dep/linux/rtw_android.c

This makes the build process finish smoothly with the current master version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants