From bab056eb8621d499d0a2be688ef1a06797a7da1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Mon, 17 Jun 2024 21:43:45 +0000 Subject: v4l2: v4l2_compat: Fix redirect from `__open(at)64_2()` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To avoid confusion, have `__open64_2()` and `__openat64_2()` delegate to `open64()` and `openat64()`, respectively, instead of `open()` and `openat()`. This does not change the behaviour because `V4L2CompatManager::instance()->openat()` calls `openat64()` internally, and that adds the `O_LARGEFILE` flag unconditionally. Fixes: 1023107b6405 ("v4l2: v4l2_compat: Intercept open64, openat64, and mmap64") Signed-off-by: Barnabás Pőcze Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/v4l2/v4l2_compat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/v4l2/v4l2_compat.cpp b/src/v4l2/v4l2_compat.cpp index 8e2b7e92..8a44403e 100644 --- a/src/v4l2/v4l2_compat.cpp +++ b/src/v4l2/v4l2_compat.cpp @@ -59,7 +59,7 @@ LIBCAMERA_PUBLIC int open64(const char *path, int oflag, ...) LIBCAMERA_PUBLIC int __open64_2(const char *path, int oflag) { - return open(path, oflag); + return open64(path, oflag); } #endif @@ -90,7 +90,7 @@ LIBCAMERA_PUBLIC int openat64(int dirfd, const char *path, int oflag, ...) LIBCAMERA_PUBLIC int __openat64_2(int dirfd, const char *path, int oflag) { - return openat(dirfd, path, oflag); + return openat64(dirfd, path, oflag); } #endif -- cgit v1.2.1