The patch number 8239 was added via Mauro Carvalho Chehab <[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:
[EMAIL PROTECTED]
------
From: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
merge: http://www.linuxtv.org/hg/~tmerle/v4l2-library
Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
v4l2-apps/lib/libv4l/ChangeLog | 4 ++--
v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h | 9 +++++++++
v4l2-apps/lib/libv4l/libv4l1/libv4l1.c | 2 +-
3 files changed, 12 insertions(+), 3 deletions(-)
diff -r 235a576fd9b7 -r 3534c3ae5597 v4l2-apps/lib/libv4l/ChangeLog
--- a/v4l2-apps/lib/libv4l/ChangeLog Wed Jul 09 22:42:07 2008 -0300
+++ b/v4l2-apps/lib/libv4l/ChangeLog Wed Jul 09 22:43:46 2008 -0300
@@ -1,5 +1,5 @@ libv4l-0.3.4
-libv4l-0.3.4
-------------
+libv4l-0.3.4 (the brownpaperbag release)
+----------------------------------------
* The mmap64 support in 0.3.3, has caused a bug in libv4l1 when running on
32 bit systems (who uses those now a days?), this bug caused v4l1
compatibility to not work at all, this release fixes this
diff -r 235a576fd9b7 -r 3534c3ae5597 v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h
--- a/v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h Wed Jul 09 22:42:07
2008 -0300
+++ b/v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h Wed Jul 09 22:43:46
2008 -0300
@@ -21,6 +21,15 @@
#include <stdio.h>
#include <pthread.h>
+
+/* On 32 bits archs we always use mmap2, on 64 bits archs there is no mmap2 */
+#ifdef __NR_mmap2
+#define SYS_mmap2 __NR_mmap2
+#define MMAP2_PAGE_SHIFT 12
+#else
+#define SYS_mmap2 SYS_mmap
+#define MMAP2_PAGE_SHIFT 0
+#endif
#define V4L1_MAX_DEVICES 16
#define V4L1_NO_FRAMES 4
diff -r 235a576fd9b7 -r 3534c3ae5597 v4l2-apps/lib/libv4l/libv4l1/libv4l1.c
--- a/v4l2-apps/lib/libv4l/libv4l1/libv4l1.c Wed Jul 09 22:42:07 2008 -0300
+++ b/v4l2-apps/lib/libv4l/libv4l1/libv4l1.c Wed Jul 09 22:43:46 2008 -0300
@@ -644,7 +644,7 @@ int v4l1_ioctl (int fd, unsigned long in
}
if (devices[index].v4l1_frame_pointer == MAP_FAILED) {
- devices[index].v4l1_frame_pointer = (void *)syscall(SYS_mmap, NULL,
+ devices[index].v4l1_frame_pointer = (void *)syscall(SYS_mmap2, NULL,
(size_t)mbuf->size,
PROT_READ|PROT_WRITE,
MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
---
Patch is available at:
http://linuxtv.org/hg/v4l-dvb/rev/3534c3ae55972b6cc5c5ef8ba3040c6f52e0ef99
_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits