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

Tom Evans tevans.uk at googlemail.com
Tue Dec 13 19:08:14 CET 2011


Hi all

FreeBSD supports the v4l2 API via webcamd, which is "…basically an
application which is a port of Video4Linux USB drivers into userspace
on FreeBSD". Since it is not Linux, it does not have a asm/types.h
header.

Cheers

Tom

diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index dc54c4a..c8ce09b 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -41,7 +41,9 @@
 #if HAVE_SYS_VIDEOIO_H
 #include <sys/videoio.h>
 #else
+#ifdef __linux__
 #include <asm/types.h>
+#endif
 #include <linux/videodev2.h>
 #endif
 #include <time.h>


More information about the ffmpeg-devel mailing list