Commit 78434823 authored by Ting-Wei Lan's avatar Ting-Wei Lan Committed by Nicolas Dufresne

v4l2object: Check for mmap64 before using it

mmap64 is not available on FreeBSD.

https://bugzilla.gnome.org/show_bug.cgi?id=791779
parent 8b814f63
......@@ -197,6 +197,7 @@ fi
dnl Check for mmap (needed by electricfence plugin)
AC_FUNC_MMAP
AC_CHECK_FUNCS([mmap64])
AM_CONDITIONAL(GST_HAVE_MMAP, test "x$ac_cv_func_mmap_fixed_mapped" = "xyes")
dnl Check for mmap (needed by electricfence plugin)
......
......@@ -105,6 +105,7 @@ check_functions = [
['HAVE_ISINF', 'isinf', '#include<math.h>'],
# check token HAVE_LIBV4L2
['HAVE_MMAP', 'mmap', '#include<sys/mman.h>'],
['HAVE_MMAP64', 'mmap64', '#include<sys/mman.h>'],
# check token HAVE_OSX_AUDIO
# check token HAVE_OSX_VIDEO
# check token HAVE_RDTSC
......
......@@ -515,7 +515,11 @@ gst_v4l2_object_new (GstElement * element,
v4l2object->dup = dup;
v4l2object->ioctl = ioctl;
v4l2object->read = read;
#ifdef HAVE_MMAP64
v4l2object->mmap = mmap64;
#else
v4l2object->mmap = mmap;
#endif
v4l2object->munmap = munmap;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment