summaryrefslogtreecommitdiff
path: root/v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h')
-rw-r--r--v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h b/v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h
index e107581d1..e09041256 100644
--- a/v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h
+++ b/v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h
@@ -22,6 +22,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
#define V4L1_FRAME_BUF_SIZE (4096 * 4096)