From 5ceaf66079451b08c66c28cff6f975e479b45c4a Mon Sep 17 00:00:00 2001 From: Geraldo Nascimento Date: Tue, 3 May 2022 18:56:28 -0300 Subject: [PATCH] v4l: O_NONBLOCK flag should be OR'ed to O_RDWR or mmap will fail below Closes #1299 --- panda/src/vision/webcamVideoCursorV4L.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/vision/webcamVideoCursorV4L.cxx b/panda/src/vision/webcamVideoCursorV4L.cxx index 197bda3228..1939b16912 100644 --- a/panda/src/vision/webcamVideoCursorV4L.cxx +++ b/panda/src/vision/webcamVideoCursorV4L.cxx @@ -217,7 +217,7 @@ WebcamVideoCursorV4L(WebcamVideoV4L *src) : MovieVideoCursor(src) { int mode = O_RDWR; if (!v4l_blocking) { - mode = O_NONBLOCK; + mode |= O_NONBLOCK; } _fd = open(src->_device.c_str(), mode);