Re: Build fails Ubuntu 17.04 / "error: implicit declaration of function"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Thomas,

Thanks for the help (and to Vincent as well) :)

In "/home/ubuntu/media_build/v4l/cec-core.c" changed row 142 from:
"ret = cdev_device_add(&devnode->cdev, &devnode->dev);" to:
"ret = device_add(&devnode->dev);"
and row 186 from:
"cdev_device_del(&devnode->cdev, &devnode->dev);" to:
"device_del(&devnode->dev);"

Even if I do that when I try to build it again (using ./build) it
seems to reload / revert the cec-core.c to the original file since I
still get these errors even though I saved the changes in Notepadqq:
"/home/ubuntu/media_build/v4l/cec-core.c:142:8: error: implicit
declaration of function 'cdev_device_add'
[-Werror=implicit-function-declaration]
  ret = cdev_device_add(&devnode->cdev, &devnode->dev);"
and
"/home/ubuntu/media_build/v4l/cec-core.c:186:2: error: implicit
declaration of function 'cdev_device_del'
[-Werror=implicit-function-declaration]
  cdev_device_del(&devnode->cdev, &devnode->dev);"

I am probably missing something here since it worked for you, would be
grateful for your help :)

/Karl
Med vänlig hälsning / Best Regards - Karl Wallin

karl.wallin.86@xxxxxxxxx

P.S. Om mitt mail bör vidarebefodras, vänligen gör detta istället för
att återkomma med en email-adress i ett svar till mig. / If my mail
should be forwarded then please forward it instead of replying to me
with an email address. P.S.


2017-05-28 14:28 GMT+02:00 Thomas Kaiser <thomas@xxxxxxxxxxxxxxx>:
> On 27.05.2017 21:28, Karl Wallin wrote:
>>
>> Hi!
>>
>> Sorry if this is something I should have figured out, I am bit
>> experienced with Linux but not at all a pro.
>>
>> Trying to build v4l-dvb on Ubuntu 17.04 (kernel 4.10.0-21-generic) and
>> get build errors.
>>
>> Dependencies are met:
>>
>> make[2]: Entering directory '/usr/src/linux-headers-4.10.0-21-generic'
>>    CC [M]  /home/ubuntu/media_build/v4l/cec-core.o
>> /home/ubuntu/media_build/v4l/cec-core.c: In function
>> 'cec_devnode_register':
>> /home/ubuntu/media_build/v4l/cec-core.c:142:8: error: implicit
>> declaration of function 'cdev_device_add'
>> [-Werror=implicit-function-declaration]
>>    ret = cdev_device_add(&devnode->cdev, &devnode->dev);
>>          ^~~~~~~~~~~~~~~
>> /home/ubuntu/media_build/v4l/cec-core.c: In function
>> 'cec_devnode_unregister':
>> /home/ubuntu/media_build/v4l/cec-core.c:186:2: error: implicit
>> declaration of function 'cdev_device_del'
>> [-Werror=implicit-function-declaration]
>>    cdev_device_del(&devnode->cdev, &devnode->dev);
>>    ^~~~~~~~~~~~~~~
>
>
> Hi Karl
>
> I changed in cec-core.c cdev_device_add(&devnode->cdev, &devnode->dev) and
> cdev_device_del(&devnode->cdev, &devnode->dev) to device_add(&devnode->dev)
> and device_del(&devnode->dev).
>
> I can compile now and the driver runs with kernel 4.10.0-21-generic on
> Ubuntu 17.04.
>
> Thomas
>




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux