|
From: Paul B. <peb...@gm...> - 2009-01-19 12:49:31
|
Sending again from the correct email address. > That's the wrong approach. I guess the error comes from lirc.h. Every > include file should include the files it requires, so you should not > need > to include other files before you include that one. > Does including <sys/types.h> after <linux/types.h> in lirc.h fix the > problem? > Christoph Adding <sys/types.h> after <linux/types.h> in lirc.h does not fix the problem as linux/types.h as already defined the conflicting types (e.g. timer_t, dev_t). However, selectively including either linux/types.h or sys/types.h does fix the problem. That is, #if defined(__KERNEL__) #include <linux/types.h> #else #include <sys/types.h> #endif fixes the problem. Having said that, why is types.h included at all? Looking at lirc.h, it does not appear that it is using anything from types.h. On my system, removing linux/types.h from lirc.h fixes the problem and does not break anything. |