svn commit: r432013 - in head/devel/ptlib: . files
Jan Beich
jbeich at FreeBSD.org
Sat Jan 21 04:40:08 UTC 2017
Author: jbeich
Date: Sat Jan 21 04:40:06 2017
New Revision: 432013
URL: https://svnweb.freebsd.org/changeset/ports/432013
Log:
devel/ptlib: properly detect mmap(2) failure
PR: 216019
MFH: 2017Q1
Added:
head/devel/ptlib/files/patch-plugins_vidinput__bsd_vidinput__bsd.cxx (contents, props changed)
head/devel/ptlib/files/patch-plugins_vidinput__v4l_vidinput__v4l.cxx (contents, props changed)
Modified:
head/devel/ptlib/Makefile (contents, props changed)
Modified: head/devel/ptlib/Makefile
==============================================================================
--- head/devel/ptlib/Makefile Sat Jan 21 04:39:52 2017 (r432012)
+++ head/devel/ptlib/Makefile Sat Jan 21 04:40:06 2017 (r432013)
@@ -3,6 +3,7 @@
PORTNAME= ptlib
PORTVERSION= 2.10.11
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= GNOME
Added: head/devel/ptlib/files/patch-plugins_vidinput__bsd_vidinput__bsd.cxx
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/ptlib/files/patch-plugins_vidinput__bsd_vidinput__bsd.cxx Sat Jan 21 04:40:06 2017 (r432013)
@@ -0,0 +1,11 @@
+--- plugins/vidinput_bsd/vidinput_bsd.cxx.orig 2013-08-14 23:20:28 UTC
++++ plugins/vidinput_bsd/vidinput_bsd.cxx
+@@ -308,7 +308,7 @@ PBoolean PVideoInputDevice_BSDCAPTURE::G
+
+ mmap_size = frameBytes;
+ videoBuffer = (BYTE *)::mmap(0, mmap_size, PROT_READ, 0, videoFd, 0);
+- if (videoBuffer < 0) {
++ if (videoBuffer == MAP_FAILED) {
+ return PFalse;
+ } else {
+ canMap = 1;
Added: head/devel/ptlib/files/patch-plugins_vidinput__v4l_vidinput__v4l.cxx
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/ptlib/files/patch-plugins_vidinput__v4l_vidinput__v4l.cxx Sat Jan 21 04:40:06 2017 (r432013)
@@ -0,0 +1,11 @@
+--- plugins/vidinput_v4l/vidinput_v4l.cxx.orig 2013-08-14 23:20:28 UTC
++++ plugins/vidinput_v4l/vidinput_v4l.cxx
+@@ -978,7 +978,7 @@ PBoolean PVideoInputDevice_V4L::GetFrame
+ } else {
+ videoBuffer = (BYTE *)::mmap(0, frame.size, PROT_READ|PROT_WRITE, MAP_SHARED, videoFd, 0);
+
+- if (videoBuffer < 0) {
++ if (videoBuffer == MAP_FAILED) {
+ canMap = 0;
+ PTRACE(3, "VideoGrabber " << deviceName << " cannot do memory mapping - ::mmap failed.");
+ //This video device cannot do memory mapping.
More information about the svn-ports-all
mailing list