[FFmpeg-devel] [PATCH] libavdevice: Fix v4l2 compilation under FreeBSD

Tom Evans tevans.uk at googlemail.com
Thu Dec 15 21:21:54 CET 2011


On Tue, Dec 13, 2011 at 7:11 PM, Tom Evans <tevans.uk at googlemail.com> wrote:
> On Tue, Dec 13, 2011 at 6:32 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> a check in configure and a
>> #if HAVE_ASM_TYPES_H
>> or something like this would be better
>>
>> please look at the existing header checks in configure, its quite
>> simple to do
>>
> Thanks, I'll change it to do that.

I think this is the right way to check? This patch is a little longer,
should I be attaching it or is inline OK?

diff --git a/configure b/configure
index 5593938..d59e474 100755
--- a/configure
+++ b/configure
@@ -1138,6 +1138,7 @@ HAVE_LIST="
     altivec_h
     arpa_inet_h
     asm_mod_y
+    asm_types_h
     attribute_may_alias
     attribute_packed
     cbrtf
@@ -2995,6 +2996,7 @@ check_header termios.h
 check_header vdpau/vdpau.h
 check_header vdpau/vdpau_x11.h
 check_header X11/extensions/XvMClib.h
+check_header asm/types.h

 disabled  zlib || check_lib   zlib.h      zlibVersion -lz   || disable  zlib
 disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index dc54c4a..15356fe 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -41,7 +41,9 @@
 #if HAVE_SYS_VIDEOIO_H
 #include <sys/videoio.h>
 #else
+#if HAVE_ASM_TYPES_H
 #include <asm/types.h>
+#endif
 #include <linux/videodev2.h>
 #endif
 #include <time.h>


More information about the ffmpeg-devel mailing list