skuhl / sys-prog-examples

Simple C programs demonstrating different aspects of programming on Linux.
Other
165 stars 50 forks source link

issue while building #1

Closed shashankmjain closed 6 years ago

shashankmjain commented 6 years ago

Hi, I get this error after building

make -C /lib/modules/4.14.12/build M=/home/jain_sm/sys-prog-examples/kernel-module modules make[1]: Entering directory '/home/jain_sm/linux-4.14.12' CC [M] /home/jain_sm/sys-prog-examples/kernel-module/chardev.o In file included from /home/jain_sm/sys-prog-examples/kernel-module/chardev.c:10:0: ./arch/x86/include/asm/uaccess.h: In function ‘set_fs’: ./arch/x86/include/asm/uaccess.h:32:9: error: dereferencing pointer to incomplete type ‘struct task_struct’ current->thread.addr_limit = fs; ^ scripts/Makefile.build:320: recipe for target '/home/jain_sm/sys-prog-examples/kernel-module/chardev.o' failed make[2]: [/home/jain_sm/sys-prog-examples/kernel-module/chardev.o] Error 1 Makefile:1507: recipe for target 'module/home/jain_sm/sys-prog-examples/kernel-module' failed make[1]: [module/home/jain_sm/sys-prog-examples/kernel-module] Error 2 make[1]: Leaving directory '/home/jain_sm/linux-4.14.12' Makefile:9: recipe for target 'default' failed make: *** [default] Error 2