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...
Intel Core i7-7800x CPU processor sr3nh 3.50ghz 6-Core 8.25mb lga-2066 X series
$36.41
Intel - Core i7-12700K Desktop Processor 12 (8P+4E) Cores up to 5.0 GHz Unloc...
$242.99
Intel - Core i9-14900K 14th Gen 24-Core 32-Thread - 4.4GHz (6.0GHz Turbo) Soc...
$539.99
Intel SR2L6 Core i5-6500 3.2GHz 6th Gen LGA1151 Socket Quad-Core Processor
$24.59
Intel 6 Core i5-8600 3.1GHZ Desktop Processor SR3X0
$50.00
Intel - Core i7-14700K 14th Gen 20-Core 28-Thread - 4.3GHz (5.6GHz Turbo) Soc...
$399.99
INTEL XEON GOLD 6148 20 Core SR3B6 2.4GHZ 27.5MB Processor @24
$99.99
Intel Xeon E5-2690V2 3.00GHz 10-Core (SR1A5) Processor CPU READ DESCRIPTION
$12.00
AMD Ryzen 7 2700X CPU Processor 3.7GHz AM4
$74.99
AMD EPYC 7F52 CPU processor 16 cores 32 threads 3.5GHZ up to 3.9GHZ 240w
$299.00