LDD 例子代码编译出错,出错信息如下,请求大侠指点。谢谢!
make -C /lib/modules/4.13.0-36-generic/build M=/home/kdt/LDD/ch8 modules
make[1]: Entering directory '/usr/src/linux-headers-4.13.0-36-generic'
CC [M] /home/kdt/LDD/ch8/globalfifo.o
/home/kdt/LDD/ch8/globalfifo.c: In function ‘globalfifo_read’:
/home/kdt/LDD/ch8/globalfifo.c:108:7: error: implicit declaration of function ‘signal_pending’ [-Werror=implicit-function-declaration]
if (signal_pending(current)) {
^
In file included from ./include/linux/printk.h:6:0,
from ./include/linux/kernel.h:13,
from ./include/linux/list.h:8,
from ./include/linux/module.h:9,
from /home/kdt/LDD/ch8/globalfifo.c:9:
./include/linux/kern_levels.h:4:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
./include/linux/kern_levels.h:13:19: note: in expansion of macro ‘KERN_SOH’
#define