3

Kernel version : 3.13.0-32-generic

When i am building the module getting the error

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

How to remove the error

Dpk
  • 311
  • 5
  • 16
  • Possible duplicate of [error: implicit declaration of function 'create\_proc\_read\_entry' \[-Werror=implicit-function-declaration\]](https://stackoverflow.com/questions/25746461/error-implicit-declaration-of-function-create-proc-read-entry-werror-implic) – Leos313 Jan 02 '18 at 15:56

1 Answers1

5

create_proc_entry has been removed since 3.10 kernel version. Alternative is to use proc_create. See that question for more info.

Community
  • 1
  • 1
Tsyvarev
  • 60,011
  • 17
  • 110
  • 153