i was trying to compile the simplest self-made module (pasted form the book "Linux Device Drivers") and i've got plenty of errors.
the code of the 'module' is
#define MODULE
#include <linux/module.h>
int init_module(void){printk("<1>Hello,world \n");return 0;}
void cleanup_module(void){printk("<1>Goodbye cruel world \n");}
and errors are:
In file included from /usr/include/linux/timex.h:58,
from /usr/include/linux/sched.h:11,
from /usr/include/linux/module.h:10,
from hello.c:3:
/usr/include/linux/time.h:13: error: syntax error before "time_t"
/usr/include/linux/time.h:15: error: syntax error before '}' token
/usr/include/linux/time.h:19: error: syntax error before "time_t"
/usr/include/linux/time.h:143: error: field `it_interval' has incomplete type
/usr/include/linux/time.h:144: error: field `it_value' has incomplete type
/usr/include/linux/time.h:148: error: field `it_interval' has incomplete type
/usr/include/linux/time.h:149: error: field `it_value' has incomplete type
In file included from /usr/include/linux/sched.h:11,
from /usr/include/linux/module.h:10,
from hello.c:3:
/usr/include/linux/timex.h:147: error: field `time' has incomplete type
In file included from /usr/include/linux/sched.h:12,
from /usr/include/linux/module.h:10,
from hello.c:3:
/usr/include/linux/jiffies.h:84: error: syntax error before "jiffies_64"
...
and lots of so sort of lines...
For Lenovo IdeaPad 3 15IIL05 15IML05 15ADA05 15ARE05 Palmrest Keyboard Touchpad
$59.25
For Lenovo Yoga 910-13IKB USB C Charging Port Board with Cable NS-A901 US
$138.04
New For Lenovo IdeaPad Flex 5 14ALC05 Palmrest Keyboard Grey Backlit 5CB1C39900
$142.11
Lenovo - LOQ 15.6" Gaming Laptop FHD - Intel Core i5-13420H with 8GB Memory -...
$629.99
Lenovo ThinkPad T480 14" Touchscreen Laptop i5 256GB NVMe 16GB RAM Win 11 Pro
$249.00
Lenovo 100e Chromebook Laptop 2nd Gen | 11.6" HD | MTK 1.7GHz | 4GB RAM | 32GB
$32.00
Lenovo Ideapad 1i 15.6" FHD Notebook Intel Core i5-1235U 8GB RAM 256GB SSD
$349.99
Lenovo 11.6" Laptop PC Computer Intel 4GB RAM 64GB SSD HDMI WIFI Windows 10
$89.99
Notebook Lenovo Slim Pro 9 Laptop, 16" Glass, i9-13905H, GB, 1TB SSD
$1051.99
Lenovo ThinkPad 14" Laptop Computer Core i7 16GB RAM 256GB SSD Windows 10 Pro
$229.99