On 2011-12-27 00:02:23 +0100, Reinhard Tartler wrote:
> This fixes a build failure on kFreeBSD, which has recently started to
> provide v4l2 headers.

it provides linux/videodev2.h ? strange

> However, libavdevice/v4l2.c additionally includes
> the header files <asm/types.h>, which is too Linux specific here.
> Therefore, this patch restricts libavdevice's support to Linux hosts
> until libavdevice gets fixed.

At least here asm/types.h is not needed and following patch is enough.
If necessary we should tests if asm/types.h is required and include
it only then.

> ---
>  configure |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 9b510de..158fd78 100755
> --- a/configure
> +++ b/configure
> @@ -2987,8 +2987,8 @@ fi
>  texi2html -version > /dev/null 2>&1 && enable texi2html || disable texi2html
>
>  check_header linux/fb.h
> -check_header linux/videodev.h
> -check_header linux/videodev2.h
> +test $target_os = 'linux' && check_header linux/videodev.h

that's unrelated, libavdevice/v4l2.c only depends on videodev2.h

> +test $target_os = 'linux' && check_header linux/videodev2.h
>  check_header sys/videoio.h
>
>  check_func_headers "windows.h vfw.h" capCreateCaptureWindow 
> "$vfwcap_indev_extralibs"
> --

Janne

---8<---
---
 libavdevice/v4l2.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 0c61f46..eb16171 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -39,7 +39,6 @@
 #if HAVE_SYS_VIDEOIO_H
 #include <sys/videoio.h>
 #else
-#include <asm/types.h>
 #include <linux/videodev2.h>
 #endif
 #include <time.h>
-- 
1.7.8.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to