$NetBSD: patch-ad,v 1.2 2008/09/08 19:10:20 jmcneill Exp $ --- libv4l2/libv4l2.c.orig 2008-09-08 14:41:10.000000000 -0400 +++ libv4l2/libv4l2.c 2008-09-08 14:42:04.000000000 -0400 @@ -59,7 +59,11 @@ #include #include #include +#ifdef __linux__ #include +#else +#include +#endif #include #include #include @@ -69,6 +73,10 @@ #include "libv4l2.h" #include "libv4l2-priv.h" +#ifndef MAP_ANONYMOUS +#define MAP_ANONYMOUS MAP_ANON +#endif + /* Note these flags are stored together with the flags passed to v4l2_fd_open() in v4l2_dev_info's flags member, so care should be taken that the do not use the same bits! */