$NetBSD: patch-al,v 1.2 2012/04/18 17:47:22 hans 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 #include +#ifdef __linux__ #include /* 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,26 @@ #include /* end broken header workaround includes */ #include +#else +#ifdef __sun +#include +#endif +#include +#include "videodev.h" +#endif #include "libv4l1-priv.h" +#if defined(__sun) +#define IOCGROUP(x) (((x) >> 8) & 0xff) +#endif + +#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;