gpt4 book ai didi

linux - 错误 : implicit declaration of function ‘create_proc_entry’

转载 作者:太空狗 更新时间:2023-10-29 11:43:28 24 4
gpt4 key购买 nike

内核版本:3.13.0-32-generic

当我构建模块时出现错误

make -C /lib/modules/3.13.0-32-generic/build M=/home/wipro/Downloads/proc modules make[1]: Entering directory /usr/src/linux-headers-3.13.0-32-generic' CC [M]
/home/wipro/Downloads/proc/proc.o /home/wipro/Downloads/proc/proc.c:
In function ‘proc_win_init’: /home/wipro/Downloads/proc/proc.c:21:5:
error: implicit declaration of function ‘create_proc_entry’
[-Werror=implicit-function-declaration]
if ((file = create_proc_entry("rel_time", 0666, parent)) == NULL) {
^ /home/wipro/Downloads/proc/proc.c:21:15: warning: assignment makes pointer from integer without a cast [enabled by default]
if ((file = create_proc_entry("rel_time", 0666, parent)) == NULL) {
^ /home/wipro/Downloads/proc/proc.c:25:9: error: dereferencing pointer to incomplete type
file->read_proc = time_read;
^ /home/wipro/Downloads/proc/proc.c:26:9: error: dereferencing pointer to incomplete type
file->write_proc = time_write;
^ /home/wipro/Downloads/proc/proc.c:32:9: error: dereferencing pointer to incomplete type
link->uid = 0;
^ /home/wipro/Downloads/proc/proc.c:33:9: error: dereferencing pointer to incomplete type
link->gid = 100;
^ cc1: some warnings being treated as errors make[2]: *** [/home/wipro/Downloads/proc/proc.o] Error 1 make[1]: ***
[_module_/home/wipro/Downloads/proc] Error 2 make[1]: Leaving
directory
/usr/src/linux-headers-3.13.0-32-generic' make: *** [default] Error 2

如何消除错误

最佳答案

create_proc_entry 自 3.10 内核版本以来已被删除。替代方法是使用 proc_create。看到question了解更多信息。

关于linux - 错误 : implicit declaration of function ‘create_proc_entry’ ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31310314/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com