Import of pkgsrc-2016Q3

This commit is contained in:
2016-11-18 22:39:22 +01:00
committed by sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949747 additions and 377081 deletions
+31 -5
View File
@@ -1,8 +1,9 @@
$NetBSD: patch-af,v 1.5 2013/06/24 15:57:21 jperkin Exp $
$NetBSD: patch-af,v 1.8 2016/09/09 21:07:23 richard Exp $
* XXXX
* `mode_t' is promoted to `int' when passed through `...'.
* Fix SunOS 64-bit.
* if SYS_open doesn't exist, use SYS_openat
--- libv4l2/v4l2convert.c.orig 2008-08-26 12:32:39.000000000 +0000
+++ libv4l2/v4l2convert.c
@@ -46,16 +47,30 @@ $NetBSD: patch-af,v 1.5 2013/06/24 15:57:21 jperkin Exp $
/* Check that open/read/mmap is not a define */
#if defined open || defined read || defined mmap
#error open/read/mmap is a prepocessor macro !!
@@ -61,7 +80,7 @@ LIBV4L_PUBLIC int open (const char *file
@@ -61,13 +80,20 @@ LIBV4L_PUBLIC int open (const char *file
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
+#ifdef SYS_open
fd = syscall(SYS_open, file, oflag);
+#else
+ fd = syscall(SYS_openat, AT_FDCWD, file, oflag);
+#endif
/* end of original open code */
@@ -92,6 +111,7 @@ LIBV4L_PUBLIC int open (const char *file
if (fd == -1)
@@ -92,6 +118,7 @@ LIBV4L_PUBLIC int open (const char *file
return fd;
}
@@ -63,7 +78,7 @@ $NetBSD: patch-af,v 1.5 2013/06/24 15:57:21 jperkin Exp $
LIBV4L_PUBLIC int open64(const char *file, int oflag, ...)
{
int fd;
@@ -114,6 +134,7 @@ LIBV4L_PUBLIC int open64(const char *fil
@@ -114,6 +141,7 @@ LIBV4L_PUBLIC int open64(const char *fil
return fd;
}
@@ -71,7 +86,18 @@ $NetBSD: patch-af,v 1.5 2013/06/24 15:57:21 jperkin Exp $
LIBV4L_PUBLIC int close(int fd)
{
@@ -148,11 +169,13 @@ LIBV4L_PUBLIC void *mmap(void *start, si
@@ -137,22 +165,19 @@ LIBV4L_PUBLIC int ioctl (int fd, unsigne
return v4l2_ioctl (fd, request, arg);
}
-LIBV4L_PUBLIC ssize_t read (int fd, void* buffer, size_t n)
-{
- return v4l2_read (fd, buffer, n);
-}
-
LIBV4L_PUBLIC void *mmap(void *start, size_t length, int prot, int flags, int fd,
__off_t offset)
{
return v4l2_mmap(start, length, prot, flags, fd, offset);
}