[libcamera-devel] [PATCH 2/2] v4l2: v4l2_compat_manager: Use openat64 and mmap64
Paul Elder
paul.elder at ideasonboard.com
Tue Jun 16 12:56:33 CEST 2020
Since we set _FILE_OFFSET_BITS to 32 to force the various open and mmap
symbols that we export to not be the 64-bit versions, our dlsym to get
the original open and mmap calls will not automatically be converted to
their 64-bit versions. Since we intercept both 32-bit and 64-bit
versions of open and mmap, we should be using the 64-bit version to
service both. Fetch the 64-bit versions of openat and mmap directly.
Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
---
src/v4l2/v4l2_compat_manager.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp
index f928760..9298c0f 100644
--- a/src/v4l2/v4l2_compat_manager.cpp
+++ b/src/v4l2/v4l2_compat_manager.cpp
@@ -39,11 +39,11 @@ void get_symbol(T &func, const char *name)
V4L2CompatManager::V4L2CompatManager()
: cm_(nullptr)
{
- get_symbol(fops_.openat, "openat");
+ get_symbol(fops_.openat, "openat64");
get_symbol(fops_.dup, "dup");
get_symbol(fops_.close, "close");
get_symbol(fops_.ioctl, "ioctl");
- get_symbol(fops_.mmap, "mmap");
+ get_symbol(fops_.mmap, "mmap64");
get_symbol(fops_.munmap, "munmap");
}
--
2.27.0
More information about the libcamera-devel
mailing list