From: Paul K. <pau...@xs...> - 2005-05-05 13:58:04
|
Hi Michael, >I don't think that I'm compiling for kernel space, especially because of >one of the errors i get: > >/usr/include/linux/list.h:705:2: warning: #warning "don't include kernel >headers in userspace > I still think that somehow you're building for kernel space. The reason for this is the following items in your output: >------------------------------------------------------------------------ > >In file included from /usr/include/linux/sched.h:12, > from /usr/include/linux/module.h:10, > from /usr/include/linux/i2c.h:31, > from test-i2c.c:6: >/usr/include/linux/jiffies.h:385:41: division by zero in #if > > This module.h is only included (on my system) when __KERNEL__ is defined when compiling i2c.h Which version of the kernel headers are you using? That warning message in list.h is on line 713 on my system. On more thing to check is gcc -v -E -dM test-i2c.c > defines-test-i2c.lst gcc -v -E -dM test-i2c.c 2> defines-test-i2c2.lst This list all the defines gcc uses when compiling test-i2c.c. Maybe we can find something there. Just send me the output for comparison. I am going to update to the latest kernel version/headers, see what happens there. Note: I am using linux-headers 2.6.8 and kernel 2.6.10 Can any one explain why this is different :-\ Paul |