From: "Lad, Prabhakar" <[email protected]>

There was a conflict between the mmap function pointer prototype of
struct v4l_fd and the actual function used. Make sure it is in sync
with the prototype of v4l2_mmap.

This patch fixes following build error,

v4l2-compliance.cpp: In function 'void v4l_fd_test_init(v4l_fd*, int)':
v4l2-compliance.cpp:132: error: invalid conversion from
'void* (*)(void*, size_t, int, int, int, int64_t)' to
'void* (*)(void*, size_t, int, int, int, off_t)'

Cc: Hans Verkuil <[email protected]>
Signed-off-by: Lad, Prabhakar <[email protected]>
---
 utils/v4l2-compliance/v4l-helpers.h     |    2 +-
 utils/v4l2-compliance/v4l2-compliance.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/v4l2-compliance/v4l-helpers.h 
b/utils/v4l2-compliance/v4l-helpers.h
index 48ea602..b2ce6c0 100644
--- a/utils/v4l2-compliance/v4l-helpers.h
+++ b/utils/v4l2-compliance/v4l-helpers.h
@@ -10,7 +10,7 @@ struct v4l_fd {
        int fd;
        int (*ioctl)(int fd, unsigned long cmd, ...);
        void *(*mmap)(void *addr, size_t length, int prot, int flags,
-                     int fd, int64_t offset);
+                     int fd, off_t offset);
        int (*munmap)(void *addr, size_t length);
 };
 
diff --git a/utils/v4l2-compliance/v4l2-compliance.h 
b/utils/v4l2-compliance/v4l2-compliance.h
index f2f7072..b6d4dae 100644
--- a/utils/v4l2-compliance/v4l2-compliance.h
+++ b/utils/v4l2-compliance/v4l2-compliance.h
@@ -137,7 +137,7 @@ static inline int test_ioctl(int fd, unsigned long cmd, ...)
 }
 
 static inline void *test_mmap(void *start, size_t length, int prot, int flags,
-               int fd, int64_t offset)
+               int fd, off_t offset)
 {
        return wrapper ? v4l2_mmap(start, length, prot, flags, fd, offset) :
                mmap(start, length, prot, flags, fd, offset);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to