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
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
解决方案 »
- /usr/lib64/libcrypto.so.10: no version information available
- 关于应用程序运行机制的疑惑
- centos7.3无法ping自己网关。
- cp 源文件存在硬链接时,更新现有目标文件导致硬链接被创建
- Ubuntu16.04安装ltp后没有ltpstress.sh脚本,无法运行压力测试
- vmware tools启动脚本未能在虚拟机中成功运行
- linux应用程序的线性地址的范围是0-3G,如果一个应用程序代码段长度为5G,那么线性地址怎么分配?
- 安装epel仓库时一直报错
- 关于grep正则表达式中精确次数匹配的几个问题,恳请达人指点下~
- 求解linux程序运行
- ubuntu安装交叉编译工具出现问题
- linux安装oracle问题
除非有对应版本的内核,否则不建议去编译LDD3的例程(因为内核版本不同,根本编不过)
我曾经看的时候,书中的接口,都是去较新的内核代码中去找找,学习一下新的怎么用。LDD3对于现在来说,内容还是不错的,就是老了点~
-Wno-implicit-function-declaration?