/home/user/kernrk.c: In function ‘getdents64_post_handler’: /home/user/kernrk.c:18:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] struct linux_dirent64 __user *dirent = (struct linux_dirent64 __user *)regs->si; ^ /home/user/kernrk.c:26:5: error: implicit declaration of function ‘copy_from_user’ [-Werror=implicit-function-declaration] if (copy_from_user(kbuf, dirent, nread)) { ^ /home/user/kernrk.c:31:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] long bpos = 0; ^ /home/user/kernrk.c:44:5: error: implicit declaration of function ‘copy_to_user’ [-Werror=implicit-function-declaration] if (copy_to_user(dirent, kbuf, new_nread)) { ^ /home/user/kernrk.c:19:9: warning: unused variable ‘count’ [-Wunused-variable] int count = regs->dx; ^ /home/user/kernrk.c: At top level: /home/user/kernrk.c:56:5: warning: initialization from incompatible pointer type [enabled by default] .post_handler = getdents64_post_handler, ^ /home/user/kernrk.c:56:5: warning: (near initialization for ‘kp.post_handler’) [enabled by default] cc1: some warnings being treated as errors make[2]: *** [/home/user/kernrk.o] Error 1 make[1]: *** [_module_/home/user] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-4.4.0-142-generic' make: *** [all] Error 2