在学习阿南斑竹的linux入门过程中,编译简单字符驱动程序时出现了如下错误,网上找了好久,没找到原因,不知道是不是内核版本问题,我的内核是2.4.20-8的,从前面的操作来看,似乎和阿南版主的是一个版本的
$gcc -O2 -DMODULE -D__KERNEL__ -I/usr/src/linux-2.4.20-8/include -c CharDriver.c CharDriver.c:22: warning: initialization from incompatible pointer type CharDriver.c: In function `device_read': CharDriver.c:50: `VERIFY_WRITE' undeclared (first use in this function) CharDriver.c:50: (Each undeclared identifier is reported only once CharDriver.c:50: for each function it appears in.) make: *** [CharDriver.O] Error 1
高手给解决一下,谢谢!
|