mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
v4l2object: Check for mmap64 before using it
mmap64 is not available on FreeBSD. https://bugzilla.gnome.org/show_bug.cgi?id=791779
This commit is contained in:
parent
8b814f6351
commit
784348235a
3 changed files with 6 additions and 0 deletions
|
@ -197,6 +197,7 @@ fi
|
||||||
|
|
||||||
dnl Check for mmap (needed by electricfence plugin)
|
dnl Check for mmap (needed by electricfence plugin)
|
||||||
AC_FUNC_MMAP
|
AC_FUNC_MMAP
|
||||||
|
AC_CHECK_FUNCS([mmap64])
|
||||||
AM_CONDITIONAL(GST_HAVE_MMAP, test "x$ac_cv_func_mmap_fixed_mapped" = "xyes")
|
AM_CONDITIONAL(GST_HAVE_MMAP, test "x$ac_cv_func_mmap_fixed_mapped" = "xyes")
|
||||||
|
|
||||||
dnl Check for mmap (needed by electricfence plugin)
|
dnl Check for mmap (needed by electricfence plugin)
|
||||||
|
|
|
@ -105,6 +105,7 @@ check_functions = [
|
||||||
['HAVE_ISINF', 'isinf', '#include<math.h>'],
|
['HAVE_ISINF', 'isinf', '#include<math.h>'],
|
||||||
# check token HAVE_LIBV4L2
|
# check token HAVE_LIBV4L2
|
||||||
['HAVE_MMAP', 'mmap', '#include<sys/mman.h>'],
|
['HAVE_MMAP', 'mmap', '#include<sys/mman.h>'],
|
||||||
|
['HAVE_MMAP64', 'mmap64', '#include<sys/mman.h>'],
|
||||||
# check token HAVE_OSX_AUDIO
|
# check token HAVE_OSX_AUDIO
|
||||||
# check token HAVE_OSX_VIDEO
|
# check token HAVE_OSX_VIDEO
|
||||||
# check token HAVE_RDTSC
|
# check token HAVE_RDTSC
|
||||||
|
|
|
@ -515,7 +515,11 @@ gst_v4l2_object_new (GstElement * element,
|
||||||
v4l2object->dup = dup;
|
v4l2object->dup = dup;
|
||||||
v4l2object->ioctl = ioctl;
|
v4l2object->ioctl = ioctl;
|
||||||
v4l2object->read = read;
|
v4l2object->read = read;
|
||||||
|
#ifdef HAVE_MMAP64
|
||||||
v4l2object->mmap = mmap64;
|
v4l2object->mmap = mmap64;
|
||||||
|
#else
|
||||||
|
v4l2object->mmap = mmap;
|
||||||
|
#endif
|
||||||
v4l2object->munmap = munmap;
|
v4l2object->munmap = munmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue