Untitled

By Fiery Owl, 6 Months ago, written in Plain Text, viewed 64 times.
URL http://pb.stoleyour.com/view/51e17712 Embed
Download Paste or View RawExpand paste to full width of browser
  1. /home/user/kernrk.c: In function ‘getdents64_post_handler’:
  2. /home/user/kernrk.c:18:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  3.      struct linux_dirent64 __user *dirent = (struct linux_dirent64 __user *)regs->si;
  4.      ^
  5. /home/user/kernrk.c:26:5: error: implicit declaration of function ‘copy_from_user’ [-Werror=implicit-function-declaration]
  6.      if (copy_from_user(kbuf, dirent, nread)) {
  7.      ^
  8. /home/user/kernrk.c:31:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  9.      long bpos = 0;
  10.      ^
  11. /home/user/kernrk.c:44:5: error: implicit declaration of function ‘copy_to_user’ [-Werror=implicit-function-declaration]
  12.      if (copy_to_user(dirent, kbuf, new_nread)) {
  13.      ^
  14. /home/user/kernrk.c:19:9: warning: unused variable ‘count’ [-Wunused-variable]
  15.      int count = regs->dx;
  16.          ^
  17. /home/user/kernrk.c: At top level:
  18. /home/user/kernrk.c:56:5: warning: initialization from incompatible pointer type [enabled by default]
  19.      .post_handler = getdents64_post_handler,
  20.      ^
  21. /home/user/kernrk.c:56:5: warning: (near initialization for ‘kp.post_handler’) [enabled by default]
  22. cc1: some warnings being treated as errors
  23. make[2]: *** [/home/user/kernrk.o] Error 1
  24. make[1]: *** [_module_/home/user] Error 2
  25. make[1]: Leaving directory `/usr/src/linux-headers-4.4.0-142-generic'
  26. make: *** [all] Error 2

Reply to "Untitled"

Here you can reply to the paste above