Commit a0b90f50 authored by Gwenhael Goavec-Merou's avatar Gwenhael Goavec-Merou Committed by Juan David González Cobas

spec-sw: kernel: wr-nic-dio: signal_pending is define in linux/sched/signal.h with kernel > 4.11

Since 4.11 signal_pending is declared in linux/sched/signal.h. Using
linux/sched.h result in a build failure :

spec-sw/kernel/wr-nic-dio.c: In function 'wrn_dio_cmd_stamp':
spec-sw/kernel/wr-nic-dio.c:267:7: error: implicit declaration of function 'signal_pending'; did you mean 'timer_pending'? [-Werror=implicit-function-declaration]
   if (signal_pending(current))
cc1: some warnings being treated as errors
make[5]: *** [/usr/src/linux-headers-4.18.0-2-common/scripts/ spec-sw/kernel/wr-nic-dio.o] Error 1
make[4]: *** [/usr/src/linux-headers-4.18.0-2-common/Makefile:1531: _module_spec-sw/kernel] Error 2
make[3]: *** [Makefile:146: sub-make] Error 2
make[2]: *** [Makefile:8: all] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-4.18.0-2-amd64'
make[1]: *** [Makefile:20: all] Error 2
make[1]: Leaving directory 'spec-sw/kernel'
make: *** [Makefile:28: kernel] Error 2

This patch adds preprocessor to include correct head according to the kernel version.
Signed-off-by: 's avatarGwenhael Goavec-Merou <>
parent aa8d5d99
......@@ -8,7 +8,12 @@
* by CERN, the European Institute for Nuclear Research.
#include <linux/module.h>
#include <linux/version.h>
#include <linux/sched.h>
#include <linux/sched/signal.h>
#include <linux/wait.h>
#include <linux/ktime.h>
#include <linux/atomic.h>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment