[vlc-devel] [PATCH] v4l2: unbreak BSD
Rafaël Carré
funman at videolan.org
Mon Apr 16 05:55:32 CEST 2012
---
modules/access/v4l2/demux.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/access/v4l2/demux.c b/modules/access/v4l2/demux.c
index 889a949..e2850ed 100644
--- a/modules/access/v4l2/demux.c
+++ b/modules/access/v4l2/demux.c
@@ -503,6 +503,9 @@ void DemuxClose( vlc_object_t *obj )
/** Allocates and queue a user buffer using mmap(). */
static block_t *UserPtrQueue (vlc_object_t *obj, int fd, size_t length)
{
+#ifndef MAP_ANONYMOUS
+# define MAP_ANONYMOUS MAP_ANON
+#endif
void *ptr = mmap (NULL, length, PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_ANONYMOUS, -1, 0);
if (ptr == MAP_FAILED)
--
1.7.9.5
More information about the vlc-devel
mailing list