The patch number 14293 was added via Hans de Goede <[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel
If anyone has any objections, please let us know by sending a message to:
Linux Media Mailing List <[email protected]>
------
From: Hans de Goede <[email protected]>
libv4l: use __syscall for mmap on FreeBSD
In order to get 64 bit addresses returned from the mmap syscall not
truncated on FreeBSD __syscall must be used as just syscall only returns
32 bits.
Priority: normal
Signed-off-by: Hans de Goede <[email protected]>
---
v4l2-apps/libv4l/libv4lconvert/libv4lsyscall-priv.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff -r 347b8c919f3f -r 077bc6c76b02
v4l2-apps/libv4l/libv4lconvert/libv4lsyscall-priv.h
--- a/v4l2-apps/libv4l/libv4lconvert/libv4lsyscall-priv.h Fri Jan 15
10:34:06 2010 +0100
+++ b/v4l2-apps/libv4l/libv4lconvert/libv4lsyscall-priv.h Fri Jan 15
13:43:04 2010 +0100
@@ -58,7 +58,6 @@
#define _IOC_TYPE(cmd) IOCGROUP(cmd)
#define _IOC_SIZE(cmd) IOCPARM_LEN(cmd)
#define MAP_ANONYMOUS MAP_ANON
-#define SYS_mmap2 SYS_mmap
#define MMAP2_PAGE_SHIFT 0
typedef off_t __off_t;
#endif
@@ -83,9 +82,17 @@
syscall(SYS_read, (int)(fd), (void *)(buf), (size_t)(len));
#define SYS_WRITE(fd, buf, len) \
syscall(SYS_write, (int)(fd), (void *)(buf), (size_t)(len));
+
+#ifdef __FreeBSD__
+#define SYS_MMAP(addr, len, prot, flags, fd, off) \
+ __syscall(SYS_mmap, (void *)(addr), (size_t)(len), \
+ (int)(prot), (int)(flags), (int)(fd), (__off_t)(off))
+#else
#define SYS_MMAP(addr, len, prot, flags, fd, off) \
syscall(SYS_mmap2, (void *)(addr), (size_t)(len), \
(int)(prot), (int)(flags), (int)(fd), (__off_t)((off) >>
MMAP2_PAGE_SHIFT))
+#endif
+
#define SYS_MUNMAP(addr, len) \
syscall(SYS_munmap, (void *)(addr), (size_t)(len))
---
Patch is available at:
http://linuxtv.org/hg/v4l-dvb/rev/077bc6c76b025e12478794328812a990b36d18e7
_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits