head 1.6; access; symbols pkgsrc-2020Q2:1.5.0.30 pkgsrc-2020Q2-base:1.5 pkgsrc-2020Q1:1.5.0.10 pkgsrc-2020Q1-base:1.5 pkgsrc-2019Q4:1.5.0.32 pkgsrc-2019Q4-base:1.5 pkgsrc-2019Q3:1.5.0.28 pkgsrc-2019Q3-base:1.5 pkgsrc-2019Q2:1.5.0.26 pkgsrc-2019Q2-base:1.5 pkgsrc-2019Q1:1.5.0.24 pkgsrc-2019Q1-base:1.5 pkgsrc-2018Q4:1.5.0.22 pkgsrc-2018Q4-base:1.5 pkgsrc-2018Q3:1.5.0.20 pkgsrc-2018Q3-base:1.5 pkgsrc-2018Q2:1.5.0.18 pkgsrc-2018Q2-base:1.5 pkgsrc-2018Q1:1.5.0.16 pkgsrc-2018Q1-base:1.5 pkgsrc-2017Q4:1.5.0.14 pkgsrc-2017Q4-base:1.5 pkgsrc-2017Q3:1.5.0.12 pkgsrc-2017Q3-base:1.5 pkgsrc-2017Q2:1.5.0.8 pkgsrc-2017Q2-base:1.5 pkgsrc-2017Q1:1.5.0.6 pkgsrc-2017Q1-base:1.5 pkgsrc-2016Q4:1.5.0.4 pkgsrc-2016Q4-base:1.5 pkgsrc-2016Q3:1.5.0.2 pkgsrc-2016Q3-base:1.5 pkgsrc-2016Q2:1.4.0.34 pkgsrc-2016Q2-base:1.4 pkgsrc-2016Q1:1.4.0.32 pkgsrc-2016Q1-base:1.4 pkgsrc-2015Q4:1.4.0.30 pkgsrc-2015Q4-base:1.4 pkgsrc-2015Q3:1.4.0.28 pkgsrc-2015Q3-base:1.4 pkgsrc-2015Q2:1.4.0.26 pkgsrc-2015Q2-base:1.4 pkgsrc-2015Q1:1.4.0.24 pkgsrc-2015Q1-base:1.4 pkgsrc-2014Q4:1.4.0.22 pkgsrc-2014Q4-base:1.4 pkgsrc-2014Q3:1.4.0.20 pkgsrc-2014Q3-base:1.4 pkgsrc-2014Q2:1.4.0.18 pkgsrc-2014Q2-base:1.4 pkgsrc-2014Q1:1.4.0.16 pkgsrc-2014Q1-base:1.4 pkgsrc-2013Q4:1.4.0.14 pkgsrc-2013Q4-base:1.4 pkgsrc-2013Q3:1.4.0.12 pkgsrc-2013Q3-base:1.4 pkgsrc-2013Q2:1.4.0.10 pkgsrc-2013Q2-base:1.4 pkgsrc-2013Q1:1.4.0.8 pkgsrc-2013Q1-base:1.4 pkgsrc-2012Q4:1.4.0.6 pkgsrc-2012Q4-base:1.4 pkgsrc-2012Q3:1.4.0.4 pkgsrc-2012Q3-base:1.4 pkgsrc-2012Q2:1.4.0.2 pkgsrc-2012Q2-base:1.4 pkgsrc-2012Q1:1.3.0.12 pkgsrc-2012Q1-base:1.3 pkgsrc-2011Q4:1.3.0.10 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q3:1.3.0.8 pkgsrc-2011Q3-base:1.3 pkgsrc-2011Q2:1.3.0.6 pkgsrc-2011Q2-base:1.3 pkgsrc-2011Q1:1.3.0.4 pkgsrc-2011Q1-base:1.3 pkgsrc-2010Q4:1.3.0.2 pkgsrc-2010Q4-base:1.3 pkgsrc-2010Q3:1.1.0.14 pkgsrc-2010Q3-base:1.1 pkgsrc-2010Q2:1.1.0.12 pkgsrc-2010Q2-base:1.1 pkgsrc-2010Q1:1.1.0.10 pkgsrc-2010Q1-base:1.1 pkgsrc-2009Q4:1.1.0.8 pkgsrc-2009Q4-base:1.1 pkgsrc-2009Q3:1.1.0.6 pkgsrc-2009Q3-base:1.1 pkgsrc-2009Q2:1.1.0.4 pkgsrc-2009Q2-base:1.1 pkgsrc-2009Q1:1.1.0.2 pkgsrc-2009Q1-base:1.1; locks; strict; comment @# @; 1.6 date 2020.09.02.09.54.33; author ryoon; state dead; branches; next 1.5; commitid CsbTXPoUFZfjpsmC; 1.5 date 2016.09.08.15.43.12; author richard; state Exp; branches; next 1.4; commitid MCGpxoXsO9545vlz; 1.4 date 2012.04.18.17.47.22; author hans; state Exp; branches; next 1.3; 1.3 date 2011.01.07.15.20.45; author obache; state Exp; branches; next 1.2; 1.2 date 2010.12.27.04.58.10; author obache; state Exp; branches; next 1.1; 1.1 date 2009.01.10.21.04.23; author jmcneill; state Exp; branches; next ; desc @@ 1.6 log @libv4l, libv4l1: Update graphics/libv4l with libv4l1 * Copy graphics/libv4l1 to graphics/libv4l. * Remove graphics/libv4l1. @ text @$NetBSD: patch-ak,v 1.5 2016/09/08 15:43:12 richard Exp $ * XXX * 'mode_t' is promoted to `int' when passwd through `...'. * if SYS_open doesn't exist, use SYS_openat --- libv4l1/libv4l1.c.orig 2008-08-06 08:46:06.000000000 +0000 +++ libv4l1/libv4l1.c @@@@ -44,12 +44,13 @@@@ #include #include #include -#include #include #include #include #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 :( */ #include @@@@ -58,10 +59,24 @@@@ /* end broken header workaround includes */ #include #include +#else +#include +#include +#include "videodev.h" +#ifdef __sun +#include +#else +#include +#endif +#endif #include #include "libv4l1.h" #include "libv4l1-priv.h" +#ifndef MAP_ANONYMOUS +#define MAP_ANONYMOUS MAP_ANON +#endif + #define V4L1_SUPPORTS_ENUMINPUT 0x01 #define V4L1_SUPPORTS_ENUMSTD 0x02 #define V4L1_PIX_FMT_TOUCHED 0x04 @@@@ -267,13 +282,20 @@@@ int v4l1_open (const char *file, int ofl mode_t mode; va_start (ap, oflag); - mode = va_arg (ap, mode_t); + mode = (sizeof (mode_t) < sizeof (int) ? (mode_t)va_arg (ap, int) : va_arg (ap, mode_t)); +#ifdef SYS_open fd = syscall(SYS_open, file, oflag, mode); - +#else + fd = syscall(SYS_openat, AT_FDCWD, file, oflag, mode); +#endif va_end(ap); } else - fd = syscall(SYS_open, file, oflag); +#ifdef SYS_open + fd = syscall(SYS_open, file, oflag); +#else + fd = syscall(SYS_openat, AT_FDCWD, file, oflag); +#endif /* end of original open code */ if (fd == -1) @@@@ -434,7 +456,11 @@@@ int v4l1_dup(int fd) int index; if ((index = v4l1_get_index(fd)) == -1) +#ifdef __sun + return syscall(SYS_fcntl, fd, F_DUPFD, 0); +#else return syscall(SYS_dup, fd); +#endif devices[index].open_count++; @ 1.5 log @Add license and fix Linux build to use SYS_openat syscall when SYS_open isn't available. Also, videodev.h is expected in include/linux to build. Upgrade to more current version next time around. @ text @d1 1 a1 1 $NetBSD: patch-ak,v 1.4 2012/04/18 17:47:22 hans Exp $ @ 1.4 log @Make this build on SunOS 5.11. @ text @d1 1 a1 1 $NetBSD: patch-ak,v 1.3 2011/01/07 15:20:45 obache Exp $ d5 1 d49 1 a49 1 @@@@ -267,7 +278,7 @@@@ int v4l1_open (const char *file, int ofl d56 1 d58 13 d72 2 a73 1 @@@@ -434,7 +449,11 @@@@ int v4l1_dup(int fd) @ 1.3 log @better and one more fix for mode_t of va_arg. @ text @d1 1 a1 1 $NetBSD: patch-ak,v 1.2 2010/12/27 04:58:10 obache Exp $ d23 1 a23 1 @@@@ -58,10 +59,20 @@@@ d31 3 d36 1 d57 12 @ 1.2 log @Fixes to build on DragonFly, contains bug fixes for sizeof(mode_t) != sizeof(int) @ text @d1 1 a1 1 $NetBSD: patch-ak,v 1.1 2009/01/10 21:04:23 jmcneill Exp $ d49 1 a49 1 + mode = (mode_t)va_arg (ap, int); @ 1.1 log @Add libv4l1 compatibility support, bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD$ d3 5 a7 2 --- libv4l1/libv4l1.c.orig 2009-01-10 15:34:52.000000000 -0500 +++ libv4l1/libv4l1.c 2009-01-10 15:35:47.000000000 -0500 d44 9 @