Not sure if it's the right place to report it.

At least here, v4l-utils doesn't compile if i2c-tools is installed, because the latter installs a i2c-dev.h, like the kernel does with make headers_install, but which is incompatible if used with i2c.h.

While rds-saa6588 isn't installed by default, it's compiled, and aborts:

In file included from rds-saa6588.c:16:0:
/usr/local/include/linux/i2c-dev.h:38:8: error: redefinition of 'struct i2c_msg'
/usr/include/linux/i2c.h:67:8: note: originally defined here
/usr/local/include/linux/i2c-dev.h:90:7: error: redefinition of 'union 
i2c_smbus_data'
/usr/include/linux/i2c.h:125:7: note: originally defined here

The same would happen if i2c-tools was installed in /usr, overwriting the kernel header.

I think that a fix would be something like the following, which worked in all scenarios for me:

diff -urN rds.old/Makefile rds/Makefile
--- rds.old/Makefile    2011-07-17 13:06:39.000000000 -0300
+++ rds/Makefile        2011-07-26 15:15:31.000000000 -0300
@@ -1,5 +1,7 @@
 TARGETS = rds-saa6588

+override CPPFLAGS += -DLINUX_I2C_DEV_H
+
 all: $(TARGETS)

 -include *.d
diff -urN rds.old/rds-saa6588.c rds/rds-saa6588.c
--- rds.old/rds-saa6588.c       2011-07-17 13:06:39.000000000 -0300
+++ rds/rds-saa6588.c   2011-07-26 15:16:13.000000000 -0300
@@ -12,8 +12,12 @@
 #include <errno.h>
 #include <sys/ioctl.h>
 #include <linux/types.h>
+#ifdef LINUX_I2C_DEV_H
+#include <linux/i2c-dev.h>
+#else
 #include <linux/i2c.h>
 #include <linux/i2c-dev.h>
+#endif

 int debug;

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to