/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
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"text\/x-go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"mysql","xml":"xml","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","ecmascript":"javascript","groovy":"text\/x-groovy","haskell":"text\/x-haskell","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mysql":"mysql","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"plsql","properties":"text\/x-properties","scheme":"text\/x-scheme","vb":"text\/vbscript","vbnet":"text\/vbscript","verilog":"text\/x-verilog","yaml":"text\/x-yaml"}