chciałem skompilować najprostszy moduł, którego kod pochodzi z książki "linux device drivers" tyle że przy kompilwoaniu dostałem kupę błędów. platforma używana to Knoppix.
kod 'modułu' to:
#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");}
a błędy to:
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
/usr/include/linux/time.h error: syntax error before "time_t"
/usr/include/linux/time.h error: syntax error before '}' token
/usr/include/linux/time.h error: syntax error before "time_t"
/usr/include/linux/time.h 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 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
/usr/include/linux/timex.h 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
/usr/include/linux/jiffies.h error: syntax error before "jiffies_64"
...
i dużo więcej takich linijek dalej.