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

Lukasz M lukasz.m.luki at gmail.com
Thu Oct 24 17:05:01 CEST 2013


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?
Before last paches it was included indirectly.
I don't have machine with old kernel so can't check it.

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


More information about the ffmpeg-devel mailing list