When compiling Linux: "Error: Incomplete type of array element" __linux

Source: Internet
Author: User

System: Fedora Core4

Kernel: 2.6.11.1

Error occurred:

1,

CC DRIVERS/I2C/I2C-CORE.O
In the file included from drivers/i2c/i2c-core.c:29:
Include/linux/i2c.h:58:error:array type has incomplete element type
Include/linux/i2c.h:197:error:array type has incomplete element type
drivers/i2c/i2c-core.c:in function ' I2c_transfer ':
Drivers/i2c/i2c-core.c:594:error:type of formal parameter 2 is incomplete
drivers/i2c/i2c-core.c:in function ' i2c_master_send ':
Drivers/i2c/i2c-core.c:620:error:type of formal parameter 2 is incomplete
drivers/i2c/i2c-core.c:in function ' i2c_master_recv ':
Drivers/i2c/i2c-core.c:649:error:type of formal parameter 2 is incomplete
MAKE[2]: * * * [DRIVERS/I2C/I2C-CORE.O] Error 1
MAKE[1]: * * * [DRIVERS/I2C] Error 2
Make: * * * * [Drivers] Error 2

Workaround:

Change the struct i2c_msg msg[in line 58,197 of include/linux/i2c.h to struct i2c_msg *msg

2,

In the file included from drivers/media/video/bttv-driver.c:42:
drivers/media/video/bttvp.h:233: Error: Array element is of incomplete type
The type is not allowed to be used before the declaration, so the exchange order can be passed smoothly.

。。。

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.