- 论坛徽章:
- 0
|
源程序就这么多!
#define MODULE
#include <linux/module.h>;
int init_module(void){
printk("<1>;Hello World\n" ;
return 0;
}
void cleanup_module(void){
printk("<1>;Bye, Bye" ;
}
在新装的系统Red Hat 7.3 ,内核 2.4.18-3 编译时,出现
[root@233Server csrc]# gcc -c -O3 first_mod.c
In file included from first_mod.c:2:
/usr/include/linux/module.h:60: parse error before `atomic_t'
/usr/include/linux/module.h:60: warning: no semicolon at end of struct or union
/usr/include/linux/module.h:60: warning: no semicolon at end of struct or union
/usr/include/linux/module.h:62: parse error before `}'
/usr/include/linux/module.h:62: warning: data definition has no type or storage class
/usr/include/linux/module.h:91: parse error before `}'
谁知道问题在哪里? |
|