$NetBSD: patch-al,v 1.1 2009/01/10 21:04:23 jmcneill Exp $

--- libv4l1/log.c.orig	2008-08-06 04:46:13.000000000 -0400
+++ libv4l1/log.c	2009-01-10 15:56:48.000000000 -0500
@@ -18,6 +18,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#ifdef __linux__
 #include <linux/ioctl.h>
 /* These headers are not needed by us, but by linux/videodev2.h,
    which is broken on some systems and doesn't include them itself :( */
@@ -25,8 +26,19 @@
 #include <asm/types.h>
 /* end broken header workaround includes */
 #include <linux/videodev.h>
+#else
+#include <sys/ioctl.h>
+#include "videodev.h"
+#endif
 #include "libv4l1-priv.h"
 
+#ifndef _IOC_NR
+#define _IOC_NR(x)	((x) & 0xff)
+#endif
+#ifndef _IOC_TYPE
+#define _IOC_TYPE	IOCGROUP
+#endif
+
 #define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
 
 FILE *v4l1_log_file = NULL;
