Compile kernel driver failed when processing __user
I get a compile error when compiling a kernel driver.The error info is
Code:
pxa270_gpio_led_drv.c|27 col 70| error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token Code:
static ssize_t SIMPLE_GPIO_LED_read ( struct file *file, char __user *buf, size_t count, loff_t *offset) Code:
gcc -c -Wall -O -D__KERNEL__ -DMODULE -I/home/test/Desktop/linux-2.4.21/include pxa270_gpio_led_drv.c -o pxa270_gpio_led_drv.o |
I don't recall seeing gcc print the source line with '|| ' at the beginning of the line. What version are you using?
|
You probably have an undefined type
You probably have an undefined type. Make sure that __user macro is properly defined.
|
All times are GMT -5. The time now is 04:25 PM. |