-
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)) ^~~~~~~~~~~~~~ timer_pending cc1: some warnings being treated as errors make[5]: *** [/usr/src/linux-headers-4.18.0-2-common/scripts/Makefile.build:323: 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: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
a0b90f50