blob: cbf4f2b911f3e2c83d5e77768220136c23d3128e [file] [log] [blame]
From a46cee56d05884b8020ace6f67ef8389ac1845da Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 5 Mar 2023 13:50:40 -0800
Subject: [PATCH 1/3] ioctl does not have same signature between glibc and musl
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
modules/access/v4l2/lib.c | 4 ++++
modules/access/v4l2/v4l2.h | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/modules/access/v4l2/lib.c b/modules/access/v4l2/lib.c
index b212e1bc5f..ff7c66bf35 100644
--- a/modules/access/v4l2/lib.c
+++ b/modules/access/v4l2/lib.c
@@ -43,7 +43,11 @@ int (*v4l2_fd_open) (int, int) = fd_open;
//int (*v4l2_open) (const char *, int, ...) = open;
//int (*v4l2_dup) (const char *, int, ...) = dup;
int (*v4l2_close) (int) = close;
+#ifdef __GLIBC__
int (*v4l2_ioctl) (int, unsigned long int, ...) = ioctl;
+#else
+int (*v4l2_ioctl) (int, int, ...) = ioctl;
+#endif
ssize_t (*v4l2_read) (int, void *, size_t) = read;
//ssize_t (*v4l2_write) (int, const void *, size_t) = write;
void * (*v4l2_mmap) (void *, size_t, int, int, int, int64_t) = mmap;
diff --git a/modules/access/v4l2/v4l2.h b/modules/access/v4l2/v4l2.h
index ac4562e269..727e83e9b1 100644
--- a/modules/access/v4l2/v4l2.h
+++ b/modules/access/v4l2/v4l2.h
@@ -23,7 +23,11 @@
/* libv4l2 functions */
extern int (*v4l2_fd_open) (int, int);
extern int (*v4l2_close) (int);
+#ifdef __GLIBC__
extern int (*v4l2_ioctl) (int, unsigned long int, ...);
+#else
+extern int (*v4l2_ioctl) (int, int, ...);
+#endif
extern ssize_t (*v4l2_read) (int, void *, size_t);
extern void * (*v4l2_mmap) (void *, size_t, int, int, int, int64_t);
extern int (*v4l2_munmap) (void *, size_t);
--
2.39.2