[FFmpeg-devel] [PATCHv2] avdevice/fbdev_common: fix compilation with older kernels

Ingo Brückl ib at wupperonline.de
Thu Oct 24 20:25:08 CEST 2013


Lukasz M wrote on Thu, 24 Oct 2013 17:05:01 +0200:

> On 24 October 2013 16:52, Ingo Brückl <ib at wupperonline.de> wrote:

>> This will avoid errors due to conflicting declarations
>> with linux kernels prior to 2.6.30.
>>
>> Signed-off-by: Ingo Brückl <ib at wupperonline.de>
>> ---
>>  libavdevice/fbdev_common.h |    4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/libavdevice/fbdev_common.h b/libavdevice/fbdev_common.h
>> index ecbb825..3aec2a3 100644
>> --- a/libavdevice/fbdev_common.h
>> +++ b/libavdevice/fbdev_common.h
>> @@ -23,7 +23,11 @@
>>  #ifndef AVDEVICE_FBDEV_COMMON_H
>>  #define AVDEVICE_FBDEV_COMMON_H
>>
>> +#ifndef __KERNEL_STRICT_NAMES
>> +#define __KERNEL_STRICT_NAMES
>>  #include <linux/fb.h>
>> +#undef __KERNEL_STRICT_NAMES
>> +#endif
>>  #include "libavutil/pixfmt.h"

> Isn't #include <features.h> before linux/fb.b better?

Yes, but I wasn't sure because of all the #defines and #undefs there.

> Before last paches it was included indirectly.

Then we should do so.

> I don't have machine with old kernel so can't check it.

I do. Works fine.

> In patch you submitted there will be error in case __KERNEL_STRICT_NAMES is
> defined

Oops, that's right.

Ingo


More information about the ffmpeg-devel mailing list