From patchwork Tue Jul 26 18:34:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?RnLDqWTDqXJpYyBMLiBXLiBNZXVuaWVy?= X-Patchwork-Id: 1009122 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6QIYJ04011909 for ; Tue, 26 Jul 2011 18:34:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752681Ab1GZSeR (ORCPT ); Tue, 26 Jul 2011 14:34:17 -0400 Received: from mail-gx0-f174.google.com ([209.85.161.174]:32853 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752020Ab1GZSeQ (ORCPT ); Tue, 26 Jul 2011 14:34:16 -0400 Received: by gxk21 with SMTP id 21so466630gxk.19 for ; Tue, 26 Jul 2011 11:34:16 -0700 (PDT) Received: by 10.236.155.39 with SMTP id i27mr7847461yhk.445.1311705255916; Tue, 26 Jul 2011 11:34:15 -0700 (PDT) Received: from [192.168.1.64] ([189.25.133.130]) by mx.google.com with ESMTPS id w1sm543274yhi.23.2011.07.26.11.34.13 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 26 Jul 2011 11:34:14 -0700 (PDT) Date: Tue, 26 Jul 2011 15:34:10 -0300 (BRT) From: =?ISO-8859-15?Q?Fr=E9d=E9ric_L=2E_W=2E_Meunier?= To: linux-media@vger.kernel.org Subject: v4l-utils: rds-saa6588 doesn't compile if i2c-tools is installed Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) X-Archive: encrypt MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 26 Jul 2011 18:34:27 +0000 (UTC) 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: --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 #include #include +#ifdef LINUX_I2C_DEV_H +#include +#else #include #include +#endif int debug;