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 for kernel 4.11+ compile failure #110

Merged
merged 1 commit into from
May 29, 2017
Merged

Fix for kernel 4.11+ compile failure #110

merged 1 commit into from
May 29, 2017

Conversation

tonyfinn
Copy link
Contributor

@tonyfinn tonyfinn commented May 24, 2017

Signal related functions (flush_signal, allow_signal and
signal_pending) moved from include/linux/sched.h to
include/linux/sched/signal.h in 4.11.0:

http://elixir.free-electrons.com/linux/v4.10.17/source/include/linux/sched/signal.h

As a result, this module did not build in 4.11 on my Arch system.

This updates the includes to allow this module to build on 4.11.

I'm no kernel hacker, as this is my first time touching driver code. But I built the module locally and confirmed I could connect to my own wifi after this change was made, while previously compilation failed with the following error:

DKMS make.log for rtl8812au-r68.92875e4 for kernel 4.11.2-1-ARCH (x86_64)
Wed May 24 20:12:11 IST 2017
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.11.2-1-ARCH/build M=/var/lib/dkms/rtl8812au/r68.92875e4/build  modules
make[1]: Entering directory '/usr/lib/modules/4.11.2-1-ARCH/build'
  CC [M]  /var/lib/dkms/rtl8812au/r68.92875e4/build/core/rtw_cmd.o
In file included from /var/lib/dkms/rtl8812au/r68.92875e4/build/include/drv_types.h:32:0,
                 from /var/lib/dkms/rtl8812au/r68.92875e4/build/core/rtw_cmd.c:22:
/var/lib/dkms/rtl8812au/r68.92875e4/build/include/osdep_service.h: In function 'thread_enter':
/var/lib/dkms/rtl8812au/r68.92875e4/build/include/osdep_service.h:251:2: error: implicit declaration of function 'allow_signal' [-Werror=implicit-function-declaration]
  allow_signal(SIGTERM);
  ^~~~~~~~~~~~
/var/lib/dkms/rtl8812au/r68.92875e4/build/include/osdep_service.h: In function 'flush_signals_thread':
/var/lib/dkms/rtl8812au/r68.92875e4/build/include/osdep_service.h:261:6: error: implicit declaration of function 'signal_pending' [-Werror=implicit-function-declaration]
  if (signal_pending (current))
      ^~~~~~~~~~~~~~
/var/lib/dkms/rtl8812au/r68.92875e4/build/include/osdep_service.h:263:3: error: implicit declaration of function 'flush_signals' [-Werror=implicit-function-declaration]
   flush_signals(current);
   ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:295: /var/lib/dkms/rtl8812au/r68.92875e4/build/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1492: _module_/var/lib/dkms/rtl8812au/r68.92875e4/build] Error 2
make[1]: Leaving directory '/usr/lib/modules/4.11.2-1-ARCH/build'
make: *** [Makefile:1052: modules] Error 2

@tonyfinn tonyfinn changed the title Fix for kernel 4.11+ Fix for kernel 4.11+ compile failure May 24, 2017
Signal related functions (flush_signal, allow_signal and
signal_pending) moved from include/linux/sched.h to
include/linux/sched/signal.h in 4.11.0:

http://elixir.free-electrons.com/linux/v4.10.17/source/include/linux/sched/signal.h

As a result, this module did not build in 4.11 on my Arch system.

This updates the includes to allow this module to build on 4.11.
@c4rlo
Copy link

c4rlo commented May 26, 2017

I can confirm that this fix work for me too.

@benkaiser
Copy link

Let's get this merged, currently building against Tony's branch to avoid a broken wireless driver

@gnab gnab merged commit 8de9cbf into gnab:master May 29, 2017
@ghost
Copy link

ghost commented Jun 4, 2017

Thanks for the heads-up. This also shows up in the dahdi kernel module!

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.

4 participants