Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Can't include both linux/i2c.h and linux/i2c-dev.h if i2c-dev is provided by i2c-tools #89

@thiagomacieira

Description

@thiagomacieira

Whenever linux/i2c-dev.h is provided by i2c-tools, it is incompatible with linux/i2c.h.

Errors:

In file included from src/shared/sol-i2c-linux.c:39:0:
/usr/include/linux/i2c-dev.h:37:8: error: redefinition of ‘struct i2c_msg’
 struct i2c_msg {
        ^
In file included from src/shared/sol-i2c-linux.c:38:0:
/usr/include/linux/i2c.h:68:8: note: originally defined here
 struct i2c_msg {
        ^
In file included from src/shared/sol-i2c-linux.c:39:0:
/usr/include/linux/i2c-dev.h:89:7: error: redefinition of ‘union i2c_smbus_data’
 union i2c_smbus_data {
       ^
In file included from src/shared/sol-i2c-linux.c:38:0:
/usr/include/linux/i2c.h:128:7: note: originally defined here
 union i2c_smbus_data {
       ^

See https://build.opensuse.org/package/view_file/openSUSE:13.2/linux-glibc-devel/linux-glibc-devel.spec line 102

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions